diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-01-01 10:12:18 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-01-01 10:12:18 +1030 |
commit | 434ae514c23047db87a8bbf39cebc9e1767aea44 (patch) | |
tree | fae5886a91918f58ebce58b01f691a4391112226 /include/asm-m68k | |
parent | ccec25ff69d5f48c7a088c16fe2dc7e11d9e87fe (diff) | |
download | kernel_samsung_smdk4412-434ae514c23047db87a8bbf39cebc9e1767aea44.zip kernel_samsung_smdk4412-434ae514c23047db87a8bbf39cebc9e1767aea44.tar.gz kernel_samsung_smdk4412-434ae514c23047db87a8bbf39cebc9e1767aea44.tar.bz2 |
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 <rusty@rustcorp.com.au>
Diffstat (limited to 'include/asm-m68k')
-rw-r--r-- | include/asm-m68k/bitops.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 <asm-generic/bitops/fls64.h> #include <asm-generic/bitops/sched.h> #include <asm-generic/bitops/hweight.h> |