Re: [PATCH] OMAP2/3 clock: convert mask_to_shift() to __ffs()

2008-03-28 Thread Tony Lindgren
* Paul Walmsley <[EMAIL PROTECTED]> [080328 08:26]: > > In OMAP2/3 clock code, we've used mask_to_shift() to convert bitmasks > into shift values, via "ffs(mask) - 1". It turns out that there is > already a Linux idiom for this in asm/bitops.h: __ffs(). (Not to be > confused with ffs(), of cours

[PATCH] OMAP2/3 clock: convert mask_to_shift() to __ffs()

2008-03-27 Thread Paul Walmsley
In OMAP2/3 clock code, we've used mask_to_shift() to convert bitmasks into shift values, via "ffs(mask) - 1". It turns out that there is already a Linux idiom for this in asm/bitops.h: __ffs(). (Not to be confused with ffs(), of course. You wouldn't do that, would you?) When in Rome, do as the