Re: [PATCH v4 3/8] bits: introduce fixed-type genmasks

Jani Nikula
2025-03-05T15:53:05Z

On Wed, 05 Mar 2025, Yury Norov <yury.norov@gmail.com> 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