Re: [PATCH v6 4/7] drm/edid: parse DSC DPP passthru support flag for mode VII timings

From: Jani Nikula

Date: Wed Nov 26 2025 - 09:52:32 EST


On Wed, 26 Nov 2025, Yaroslav <iam@xxxxxx> wrote:
> On 2025-11-26 15:19, Jani Nikula wrote:
>> On Wed, 26 Nov 2025, Yaroslav Bolyukin <iam@xxxxxxx> wrote:
>>> + if (type_7 && FIELD_GET(DISPLAYID_BLOCK_REV, block->rev) >= 1)
>>> + mode->dsc_passthrough_timings_support =
>>> + !!(block->rev & DISPLAYID_BLOCK_PASSTHROUGH_TIMINGS_SUPPORT);
>>
>> The !! and parentheses are superfluous.
>>
>
> Most of the other instances of bitflag parsing logic in kernel seem to
> cast integers to booleans explicitly this way.
>
> I'm fine with simplifying that, I was only doing what everyone else does.

I get that, but such habits originate from the days before std bool. !!
normalizes ints to 0 and 1, but assigning to bool does the same for you.

BR,
Jani.


--
Jani Nikula, Intel