Re: [PATCH 3/6] block: remove the bi_phys_segments field in struct bio

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

 



On Fri, Jun 07, 2019 at 08:02:55AM +0200, Hannes Reinecke wrote:
> > +void blk_queue_split(struct request_queue *q, struct bio **bio)
> > +{
> > +	unsigned int nr_segs;
> > +
> > +	__blk_queue_split(q, bio, &nr_segs);
> > +}
> >  EXPORT_SYMBOL(blk_queue_split);
> >  
> That looks a bit weird, and I guess some or other compiler might
> complain here about nr_segs being unused.
> Can't we modify __blk_queue_split() to accept a NULL argument here?

We could.  But that would bloat the fast path for absolutely no
reason.  Passing a by reference output argument that is then ignored
is a pretty common pattern.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux