We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83dcc12 commit fa7a1e8Copy full SHA for fa7a1e8
tools/include/uapi/linux/bits.h
@@ -4,13 +4,9 @@
4
#ifndef _UAPI_LINUX_BITS_H
5
#define _UAPI_LINUX_BITS_H
6
7
-#define __GENMASK(h, l) \
8
- (((~_UL(0)) - (_UL(1) << (l)) + 1) & \
9
- (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
+#define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
10
11
-#define __GENMASK_ULL(h, l) \
12
- (((~_ULL(0)) - (_ULL(1) << (l)) + 1) & \
13
- (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
+#define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (BITS_PER_LONG_LONG - 1 - (h))))
14
15
#define __GENMASK_U128(h, l) \
16
((_BIT128((h)) << 1) - (_BIT128(l)))
0 commit comments