Re: [PATCH v4 3/8] bits: introduce fixed-type genmasks
From: Jani Nikula
Date: Wed Mar 05 2025 - 10:53:25 EST
On Wed, 05 Mar 2025, Yury Norov <yury.norov@xxxxxxxxx> wrote:
> On Wed, Mar 05, 2025 at 10:00:15PM +0900, Vincent Mailhol via B4 Relay wrote:
>> +#define GENMASK_U8(h, l) ((unsigned int)GENMASK_t(u8, h, l))
>> +#define GENMASK_U16(h, l) ((unsigned int)GENMASK_t(u16, h, l))
>
> Typecast to the type that user provides explicitly? And maybe do
> in GENMASK_TYPE()
The cast to unsigned int seemed odd to me too.
BR,
Jani.
--
Jani Nikula, Intel