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>
This commit is contained in:
parent
ccec25ff69
commit
434ae514c2
1 changed files with 5 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue