From: Rusty Russell Date: Wed, 31 Dec 2008 23:42:18 +0000 (+1030) Subject: m68k: define __fls X-Git-Tag: v3.12-rc1~16819^2~11^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=434ae514c23047db87a8bbf39cebc9e1767aea44;p=kernel%2Fkernel-generic.git m68k: define __fls Like fls, but can't be handed 0 and returns the bit number. (I broke this arch in linux-next by using __fls in generic code). Signed-off-by: Rusty Russell --- diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index 3e81064..9bde784 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h @@ -315,6 +315,11 @@ static inline int fls(int x) return 32 - cnt; } +static inline int __fls(int x) +{ + return fls(x) - 1; +} + #include #include #include