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 59cd94e commit 85a147aCopy full SHA for 85a147a
kernel/printk/printk_ringbuffer.h
@@ -4,6 +4,7 @@
4
#define _KERNEL_PRINTK_RINGBUFFER_H
5
6
#include <linux/atomic.h>
7
+#include <linux/bits.h>
8
#include <linux/dev_printk.h>
9
#include <linux/stddef.h>
10
#include <linux/types.h>
@@ -122,7 +123,7 @@ enum desc_state {
122
123
124
#define _DATA_SIZE(sz_bits) (1UL << (sz_bits))
125
#define _DESCS_COUNT(ct_bits) (1U << (ct_bits))
-#define DESC_SV_BITS (sizeof(unsigned long) * 8)
126
+#define DESC_SV_BITS BITS_PER_LONG
127
#define DESC_FLAGS_SHIFT (DESC_SV_BITS - 2)
128
#define DESC_FLAGS_MASK (3UL << DESC_FLAGS_SHIFT)
129
#define DESC_STATE(sv) (3UL & (sv >> DESC_FLAGS_SHIFT))
0 commit comments