Re: [PATCH] bitops: add equivalent of BIT(x) for bitfields

From: Geert Uytterhoeven
Date: Mon Dec 05 2016 - 12:48:16 EST


On Mon, Dec 5, 2016 at 2:36 PM, Sebastian Frias <sf84@xxxxxxxxxxx> wrote:
> Introduce SETBITFIELD(msb, lsb, value) macro to ease dealing with
> continuous bitfields, just as BIT(x) does for single bits.

If it's a bitfield, why not calling it that way?

So what about BITFIELD(start ,size), like arch/tile/kernel/tile-desc_32.c has?

> SETBITFIELD_ULL(msb, lsb, value) macro is also added.

Confused by the need for a "value" parameter...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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