Hi Jani,

On Fri, 26 Sept 2025 at 09:58, Jani Nikula <[email protected]> wrote:
> On Wed, 24 Sep 2025, Marek Vasut <[email protected]> wrote:
> > Convert register bits to BIT() macro and bitfields to 
> > GENMASK()/FIELD_PREP() macros.
> > Most of this patchset is boring mechanical conversion.
>
> I suggest using the relatively new sized BIT_U32() and GENMASK_U32(), or
> other sizes if your register sizes are different. You'll get better
> compile time protection against mistakes, and sometimes the unsigned
> long type of plain BIT() and GENMASK() can be annoying.

Thank you, I wasn't aware of these new macros!

As the commits introducing them do not have Link:-tags, here is a
link to the full patches series that introduced them:
"[PATCH v8 0/6] bits: Fixed-type GENMASK_U*() and BIT_U*()"
https://lore.kernel.org/[email protected]/

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Reply via email to