projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccec25f
)
m68k: define __fls
author
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 31 Dec 2008 23:42:18 +0000
(10:12 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 31 Dec 2008 23:42:18 +0000
(10:12 +1030)
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>
include/asm-m68k/bitops.h
patch
|
blob
|
blame
|
history
diff --git
a/include/asm-m68k/bitops.h
b/include/asm-m68k/bitops.h
index 3e8106442d5af6e7953b887ebdb8a35203e5f029..9bde784e7bad038a41d471a22af238587a998aad 100644
(file)
--- 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>