[PATCH i-g-t 1/8] include/linux_scaffold: Add BIT_U{8,16,32} macros

Ankit Nautiyal
2026-04-22T04:00:17Z

Add macros to accommodate the kernel macros BIT_U8, BIT_U16, BIT_U32
in the header file `intel_vbt_defs.h` copied from the kernel.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
include/linux_scaffold.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/linux_scaffold.h b/include/linux_scaffold.h
index 281aa5e730ed..a3acaa16117c 100644
--- a/include/linux_scaffold.h
+++ b/include/linux_scaffold.h
@@ -57,4 +57,8 @@ static inline s64 sign_extend64(u64 value, int index)
#define FIELD_GET(mask, reg) \
(typeof(mask))(((reg) & (mask)) >> __bf_shf(mask))

+#define BIT_U8(n) ((u8)(1U << (n)))
+#define BIT_U16(n) ((u16)(1U << (n)))
+#define BIT_U32(n) ((u32)(1U << (n)))
+
#endif /* _INTEL_GPU_COMMANDS_SCAFFOLD_H_ */
--
2.45.2