On Wed, 27 Oct 2021, Imre Deak <imre.d...@intel.com> wrote:
> On Tue, Oct 26, 2021 at 08:52:12PM +0300, Jani Nikula wrote:
>> AFAICT there are no intel_plane_caps references anywhere after this, and
>> it no longer looks like an enum, so perhaps it just shouldn't be an enum
>> anymore? Just make them macros?
>
> There are other instances of bitfield enums in the kernel, but yes in C
> there's no benefit of enums for this over the simpler macro approach.
> Will change this.

Semantically I think enums are good for enumerating and naming the bit
*positions*, but not so much the shifted bit values. See e.g. enum
drm_dp_quirk, where the values aren't important, but they're used with
BIT() in drm_dp_has_quirk().

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center

Reply via email to