Commit 434ae514 authored by Rusty Russell's avatar Rusty Russell

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: default avatarRusty Russell <rusty@rustcorp.com.au>
parent ccec25ff
...@@ -315,6 +315,11 @@ static inline int fls(int x) ...@@ -315,6 +315,11 @@ static inline int fls(int x)
return 32 - cnt; return 32 - cnt;
} }
static inline int __fls(int x)
{
return fls(x) - 1;
}
#include <asm-generic/bitops/fls64.h> #include <asm-generic/bitops/fls64.h>
#include <asm-generic/bitops/sched.h> #include <asm-generic/bitops/sched.h>
#include <asm-generic/bitops/hweight.h> #include <asm-generic/bitops/hweight.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment