Thread (16 messages) flat view 16 messages, 2 authors, 2021-02-04

Re: [PATCH 1/5] md: add md_submit_discard_bio() for submitting discard bio

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-02-04 07:20:44

On Thu, Feb 04, 2021 at 12:07:58PM +0800, Xiao Ni wrote:
quoted
quoted
+extern void md_submit_discard_bio(struct mddev *mddev, struct md_rdev *rdev,
+			struct bio *bio, sector_t start, sector_t size);
no need for the extern.
Hi Christoph

It needs to export it here. If not, there is compile error.

raid0.c:502:3: error: implicit declaration of function
???md_submit_discard_bio??? [-Werror=implicit-function-declaration]
   md_submit_discard_bio(mddev, rdev, bio,
Yes, the prototype needs to be in the header.  But the extern keyword
is no needed for function declarations.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help