projects
/
platform
/
kernel
/
kernel-mfld-blackbay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
165ac43
)
avr32: define __fls
author
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 31 Dec 2008 23:42:16 +0000
(10:12 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Wed, 31 Dec 2008 23:42:16 +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>
arch/avr32/include/asm/bitops.h
patch
|
blob
|
history
diff --git
a/arch/avr32/include/asm/bitops.h
b/arch/avr32/include/asm/bitops.h
index
1a50b69
..
f7dd5f7
100644
(file)
--- a/
arch/avr32/include/asm/bitops.h
+++ b/
arch/avr32/include/asm/bitops.h
@@
-263,6
+263,11
@@
static inline int fls(unsigned long word)
return 32 - result;
}
+static inline int __fls(unsigned long word)
+{
+ return fls(word) - 1;
+}
+
unsigned long find_first_zero_bit(const unsigned long *addr,
unsigned long size);
unsigned long find_next_zero_bit(const unsigned long *addr,