Commit 70b9c0c1 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Yury Norov
Browse files

uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again (2)



BITS_PER_LONG does not exist in UAPI headers, so can't be used by the UAPI
__GENMASK(). Instead __BITS_PER_LONG needs to be used.

When __GENMASK() was introduced in commit 3c7a8e19 ("uapi: introduce uapi-friendly macros for GENMASK"),
the code was fine. A broken revert in 1e7933a5 ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"")
introduced the incorrect usage of BITS_PER_LONG.
That was fixed in commit 11fcf368 ("uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again").
But a broken sync of the kernel headers with the tools/ headers in
commit fc920999 ("tools headers: Synchronize linux/bits.h with the kernel sources")
undid the fix.

Reapply the fix and while at it also fix the tools header.

Fixes: fc920999 ("tools headers: Synchronize linux/bits.h with the kernel sources")
Signed-off-by: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: default avatarYury Norov (NVIDIA) <yury.norov@gmail.com>
Signed-off-by: default avatarYury Norov (NVIDIA) <yury.norov@gmail.com>
parent d7b8f8e2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment