From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "hch@lst.de" <hch@lst.de>, "axboe@kernel.dk" <axboe@kernel.dk>
Cc: "m@bjorling.me" <m@bjorling.me>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH 4/5] block: Inline blk_rq_set_prio()
Date: Wed, 19 Apr 2017 15:54:10 +0000 [thread overview]
Message-ID: <1492617249.2543.5.camel@sandisk.com> (raw)
In-Reply-To: <352b4d72-d6ed-692b-a3d9-a664f445ad76@kernel.dk>
On Wed, 2017-04-19 at 08:38 -0600, Jens Axboe wrote:
> On 04/19/2017 12:20 AM, Christoph Hellwig wrote:
> > > + req->ioprio =3D ioprio_valid(bio_prio(bio)) ? bio_prio(bio) : ioc ?
> > > + ioc->ioprio : IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
> >=20
> > I think this would be a tad cleaner with a traditional if / else if / e=
lse
> > chain, e.g.
> >=20
> > if (ioprio_valid(bio_prio(bio)))
> > req->ioprio =3D bio_prio(bio);
> > else if (ioc)
> > req->ioprio =3D ioc->ioprio;
> > else
> > req->ioprio =3D IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
>=20
> Agree, I hate ternaries with a vengeance, and a doubly nested one is
> almost a shooting offense.
>=20
> 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.=
next prev parent reply other threads:[~2017-04-19 15:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 23:10 [PATCH 0/5] Reduce code duplication Bart Van Assche
2017-04-18 23:10 ` [PATCH 1/5] block: Export blk_init_request_from_bio() Bart Van Assche
2017-04-19 6:16 ` Christoph Hellwig
2017-04-18 23:10 ` [PATCH 2/5] null_blk: Use blk_init_request_from_bio() instead of open-coding it Bart Van Assche
2017-04-19 6:18 ` Christoph Hellwig
2017-04-18 23:10 ` [PATCH 3/5] lightnvm: " Bart Van Assche
2017-04-19 6:19 ` Christoph Hellwig
2017-04-18 23:10 ` [PATCH 4/5] block: Inline blk_rq_set_prio() Bart Van Assche
2017-04-19 6:20 ` Christoph Hellwig
2017-04-19 14:38 ` Jens Axboe
2017-04-19 15:54 ` Bart Van Assche [this message]
2017-04-18 23:10 ` [PATCH 5/5] block: Optimize ioprio_best() Bart Van Assche
2017-04-19 6:21 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492617249.2543.5.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=m@bjorling.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.