File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
tools/include/asm-generic/bitops Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 5
5
#include <asm/types.h>
6
6
7
7
/**
8
- * __fls - find last (most-significant) set bit in a long word
8
+ * generic___fls - find last (most-significant) set bit in a long word
9
9
* @word: the word to search
10
10
*
11
11
* Undefined if no set bit exists, so code should check against 0 first.
12
12
*/
13
- static __always_inline unsigned long __fls (unsigned long word )
13
+ static __always_inline unsigned long generic___fls (unsigned long word )
14
14
{
15
15
int num = BITS_PER_LONG - 1 ;
16
16
@@ -41,4 +41,8 @@ static __always_inline unsigned long __fls(unsigned long word)
41
41
return num ;
42
42
}
43
43
44
+ #ifndef __HAVE_ARCH___FLS
45
+ #define __fls (word ) generic___fls(word)
46
+ #endif
47
+
44
48
#endif /* _ASM_GENERIC_BITOPS___FLS_H_ */
Original file line number Diff line number Diff line change 3
3
#define _ASM_GENERIC_BITOPS_FLS_H_
4
4
5
5
/**
6
- * fls - find last (most-significant) bit set
6
+ * generic_fls - find last (most-significant) bit set
7
7
* @x: the word to search
8
8
*
9
9
* This is defined the same way as ffs.
10
10
* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
11
11
*/
12
12
13
- static __always_inline int fls (unsigned int x )
13
+ static __always_inline int generic_fls (unsigned int x )
14
14
{
15
15
int r = 32 ;
16
16
@@ -39,4 +39,8 @@ static __always_inline int fls(unsigned int x)
39
39
return r ;
40
40
}
41
41
42
+ #ifndef __HAVE_ARCH_FLS
43
+ #define fls (x ) generic_fls(x)
44
+ #endif
45
+
42
46
#endif /* _ASM_GENERIC_BITOPS_FLS_H_ */
You can’t perform that action at this time.
0 commit comments