1 #ifndef _ASM_GENERIC_BITOPS___FFS_H_
2 #define _ASM_GENERIC_BITOPS___FFS_H_
7 * __ffs - find first bit in word.
8 * @word: The word to search
10 * Undefined if no bit exists, so code should check against 0 first.
12 static inline unsigned long __ffs(unsigned long word)
16 #if BITS_PER_LONG == 64
17 if ((word & 0xffffffff) == 0) {
22 if ((word & 0xffff) == 0) {
26 if ((word & 0xff) == 0) {
30 if ((word & 0xf) == 0) {
34 if ((word & 0x3) == 0) {
38 if ((word & 0x1) == 0)
43 #endif /* _ASM_GENERIC_BITOPS___FFS_H_ */