Skip to content

Commit fa7a1e8

Browse files
committed
tools headers: Synchronize uapi/linux/bits.h with the kernel sources
To pick up the changes in this cset: 1e7933a ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"") This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/bits.h include/uapi/linux/bits.h Please see tools/include/uapi/README for further details. Acked-by: Vincent Mailhol <[email protected]> Acked-by: Yury Norov [NVIDIA] <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: I Hsin Cheng <[email protected]> Cc: Ian Rogers <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 83dcc12 commit fa7a1e8

File tree

1 file changed

+2
-6
lines changed
  • tools/include/uapi/linux

1 file changed

+2
-6
lines changed

tools/include/uapi/linux/bits.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44
#ifndef _UAPI_LINUX_BITS_H
55
#define _UAPI_LINUX_BITS_H
66

7-
#define __GENMASK(h, l) \
8-
(((~_UL(0)) - (_UL(1) << (l)) + 1) & \
9-
(~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
7+
#define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
108

11-
#define __GENMASK_ULL(h, l) \
12-
(((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \
13-
(~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
9+
#define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (BITS_PER_LONG_LONG - 1 - (h))))
1410

1511
#define __GENMASK_U128(h, l) \
1612
((_BIT128((h)) << 1) - (_BIT128(l)))

0 commit comments

Comments
 (0)