提交 434ae514 编写于 作者: R 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: NRusty Russell <rusty@rustcorp.com.au>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册