lkml.org 
[lkml]   [2014]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 mmots] fs/hfsplus/wrapper.c: replace shift loop by fls
From
Date
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.




\
 
 \ /
  Last update: 2014-05-20 02:01    [W:0.365 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site