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

Nautiyal, Ankit K
2026-04-27T12:32:13Z

On 4/27/2026 10:37 AM, Karthik B S wrote:
> Hi Ankit,
>
> On 4/22/2026 9:13 AM, Ankit Nautiyal wrote:
>> 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)))
>
> Should the BIT_U64 also be added to maintain consistency with the
> kernel definitions here?

Fair enough. Makes sense to add BIT_U64

I will add this and send again.

Thanks,

Ankit

>
> Thanks and Regards,
> Karthik.B.S
>> +
>>   #endif /* _INTEL_GPU_COMMANDS_SCAFFOLD_H_ */