File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
tools/include/asm-generic/bitops Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1010 *
1111 * Undefined if no set bit exists, so code should check against 0 first.
1212 */
13- static __always_inline unsigned int generic___fls (unsigned long word )
13+ static __always_inline __attribute_const__ unsigned int generic___fls (unsigned long word )
1414{
1515 unsigned int num = BITS_PER_LONG - 1 ;
1616
Original file line number Diff line number Diff line change 1010 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
1111 */
1212
13- static __always_inline int generic_fls (unsigned int x )
13+ static __always_inline __attribute_const__ int generic_fls (unsigned int x )
1414{
1515 int r = 32 ;
1616
Original file line number Diff line number Diff line change 1616 * at position 64.
1717 */
1818#if BITS_PER_LONG == 32
19- static __always_inline int fls64 (__u64 x )
19+ static __always_inline __attribute_const__ int fls64 (__u64 x )
2020{
2121 __u32 h = x >> 32 ;
2222 if (h )
2323 return fls (h ) + 32 ;
2424 return fls (x );
2525}
2626#elif BITS_PER_LONG == 64
27- static __always_inline int fls64 (__u64 x )
27+ static __always_inline __attribute_const__ int fls64 (__u64 x )
2828{
2929 if (x == 0 )
3030 return 0 ;
You can’t perform that action at this time.
0 commit comments