Skip to content

Commit 549042f

Browse files
committed
tools headers asm: Sync fls headers header with the kernel sources
To pick the changes in: 6606c8c ("bitops: Add __attribute_const__ to generic ffs()-family implementations") This addresses these tools build warnings: Warning: Kernel ABI header differences: diff -u tools/include/asm-generic/bitops/__fls.h include/asm-generic/bitops/__fls.h diff -u tools/include/asm-generic/bitops/fls.h include/asm-generic/bitops/fls.h diff -u tools/include/asm-generic/bitops/fls64.h include/asm-generic/bitops/fls64.h Please see tools/include/uapi/README for further details. Cc: Kees Cook <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent fc9ef91 commit 549042f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tools/include/asm-generic/bitops/__fls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
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

tools/include/asm-generic/bitops/fls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
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

tools/include/asm-generic/bitops/fls64.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
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;

0 commit comments

Comments
 (0)