From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Fabian Frederick <fabf@skynet.be>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 mmots] fs/hfsplus/wrapper.c: replace shift loop by fls
Date: Mon, 19 May 2014 16:22:28 -0700 [thread overview]
Message-ID: <1400541748.14238.58.camel@joe-AO725> (raw)
In-Reply-To: <20140519160946.84e79c832dfc4db0fbae573b@linux-foundation.org>
On Mon, 2014-05-19 at 16:09 -0700, Andrew Morton wrote:
> On Fri, 16 May 2014 22:38:15 +0200 Fabian Frederick <fabf@skynet.be> wrote:
> > Replace while blocksize;shift by fls -1
[]
> fls() always makes my brain hurt. ilog() is nicer?
Maybe take an aspirin?
ilog2(n) is effectively fls(n) - 1 but n can be
either u64 or u64 and ilog2 is compile-time
optimized when n is constant.
blocksize is a non-const u32 here.
next prev parent reply other threads:[~2014-05-19 23:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 20:38 [PATCH V2 mmots] fs/hfsplus/wrapper.c: replace shift loop by fls Fabian Frederick
2014-05-19 23:09 ` Andrew Morton
2014-05-19 23:22 ` Joe Perches [this message]
2014-05-19 23:40 ` Andrew Morton
2014-05-19 23:50 ` Joe Perches
2014-05-20 5:02 ` Fabian Frederick
2014-05-20 5:10 ` Joe Perches
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=1400541748.14238.58.camel@joe-AO725 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
/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