From: Joe Perches <joe@perches.com>
To: Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Julia Lawall <julia.lawall@inria.fr>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
clang-built-linux <clang-built-linux@googlegroups.com>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] block: drop dead assignments in loop_init()
Date: Fri, 11 Dec 2020 20:27:49 -0800 [thread overview]
Message-ID: <4257c266dd5edf3ad6617657331abcabfd59188f.camel@perches.com> (raw)
In-Reply-To: <CAKXUXMxjtv5B4ekC58=Ww8R4Ju2MvT0pXbPi7XH+OU7JuYnP3w@mail.gmail.com>
On Fri, 2020-12-11 at 19:40 +0100, Lukas Bulwahn wrote:
> On Fri, Dec 11, 2020 at 7:23 PM Julia Lawall <julia.lawall@inria.fr> wrote:
> > On Fri, 11 Dec 2020, Lukas Bulwahn wrote:
> > > Commit 8410d38c2552 ("loop: use __register_blkdev to allocate devices on
> > > demand") simplified loop_init(); so computing the range of the block region
> > > is not required anymore and can be dropped.
> > >
> > > Drop dead assignments in loop_init().
> > >
> > > As compilers will detect these unneeded assignments and optimize this,
> > > the resulting object code is identical before and after this change.
> > >
> > > No functional change. No change in object code.
> >
> > It looks like some braces should be dropped too?
> I just rewrote it to:
>
> nr = max_loop ? max_loop : CONFIG_BLK_DEV_LOOP_MIN_COUNT;
A relatively common gcc extension would use ?: like:
nr = max_loop ?: CONFIG_BLK_DEV_LOOP_MIN_COUNT;
prev parent reply other threads:[~2020-12-12 4:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 18:12 [PATCH] block: drop dead assignments in loop_init() Lukas Bulwahn
2020-12-11 18:23 ` Julia Lawall
2020-12-11 18:40 ` Lukas Bulwahn
2020-12-12 4:27 ` Joe Perches [this message]
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=4257c266dd5edf3ad6617657331abcabfd59188f.camel@perches.com \
--to=joe@perches.com \
--cc=axboe@kernel.dk \
--cc=clang-built-linux@googlegroups.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=julia.lawall@inria.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).