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 f9fc996 commit f15a0cbCopy full SHA for f15a0cb
sys/dev/drm/drmkpi/include/linux/bitops.h
@@ -40,13 +40,8 @@
40
41
#define BIT(nr) (1UL << (nr))
42
#define BIT_ULL(nr) (1ULL << (nr))
43
-#ifdef __LP64__
44
-#define BITS_PER_LONG 64
45
-#else
46
-#define BITS_PER_LONG 32
47
-#endif
48
-
49
-#define BITS_PER_LONG_LONG 64
+#define BITS_PER_LONG (__SIZEOF_LONG__ * __CHAR_BIT__)
+#define BITS_PER_LONG_LONG (__SIZEOF_LONG_LONG__ * __CHAR_BIT__)
50
51
#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG))
52
#define BITMAP_LAST_WORD_MASK(n) (~0UL >> (BITS_PER_LONG - (n)))
0 commit comments