Re: [PATCH v2 03/16] bitmap: Use FIELD_PREP() in expansion of FIELD_PREP_WM16()

David Laight
2026-01-21T18:59:07Z

On Wed, 21 Jan 2026 17:52:29 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> On Wed, 21 Jan 2026 at 17:50, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Fri, 12 Dec 2025 at 20:38, <david.laight.linux@gmail.com> wrote:
> > > From: David Laight <david.laight.linux@gmail.com>
> > >
> > > Instead of directly expanding __BF_FIELD_CHECK() (which really ought
> > > not be used outside bitfield) and open-coding the generation of the
> > > masked value, just call FIELD_PREP() and add an extra check for
> > > the mask being at most 16 bits.
> > > The extra check is added after calling FIELD_PREP() to get a sane
> > > error message if 'mask' isn't constant.
> > >
> > > Remove the leading _ from the formal parameter names.
> > > Prefix the local variables with _wm16_ to hopefully make them
> > > unique.
> > >
> > > Signed-off-by: David Laight <david.laight.linux@gmail.com>
> >
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Oops, just noticed commit 2fb6915fa22dc552
> ("compiler_types.h: add "auto" as a macro for "__auto_type""),
> so you want to do s/__auto_type/auto/g.

That wasn't there when I was writing the series.
I knew it was coming but didn't want build breakages.

David

>
> Gr{oetje,eeting}s,
>
> Geert
>