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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 04, 2021 at 12:07:58PM +0800, Xiao Ni wrote:
> > > +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.




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux