Re: [PATCH 4/5] block: Inline blk_rq_set_prio()

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

 



On Wed, 2017-04-19 at 08:38 -0600, Jens Axboe wrote:
> On 04/19/2017 12:20 AM, Christoph Hellwig wrote:
> > > +	req->ioprio = ioprio_valid(bio_prio(bio)) ? bio_prio(bio) : ioc ?
> > > +		ioc->ioprio : IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
> > 
> > I think this would be a tad cleaner with a traditional if / else if / else
> > chain, e.g.
> > 
> > 	if (ioprio_valid(bio_prio(bio)))
> > 		req->ioprio = bio_prio(bio);
> > 	else if (ioc)
> > 		req->ioprio = ioc->ioprio;
> > 	else
> > 		req->ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
> 
> Agree, I hate ternaries with a vengeance, and a doubly nested one is
> almost a shooting offense.
> 
> Bart, care to respin with this fixed and the GPL export modification?

Hello Christoph and Jens,

Thanks for the review and the feedback. I will make the proposed changes
and repost this patch series.

Bart.



[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