[Intel-gfx] [PATCH v2 0/4] drm/i915: introduce macros to define register contents

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 17 12:52:52 UTC 2019


Quoting Jani Nikula (2019-01-17 12:13:59)
> The v1 [1] kind of died down because the FIELD_PREP() build-time checks
> were lost as it didn't evaluate to integer constant expression. I looked
> at this again, and managed to include the checks in the local copy by
> using BUILD_BUG_ON_ZERO() instead.
> 
> On the naming bikeshedding department, I noticed a clash with regmap.h
> REG_FIELD() and, since it all looked pretty verbose anyway, decided to
> see if local _BIT(), _MASK(), and _FIELD() would stick.

MMIO_BIT, MMIO_MASK, MMIO_FIELD
#define MMIO_PREP(mask, val) FIELD_PREP(mask, val)
?

The leading underscore and the inconsistency with FIELD_PREP is getting
to me.
-Chris


More information about the Intel-gfx mailing list