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

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
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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>