lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <17f7e5e7d45bab4324968e352231f739bbdf7366@intel.com>
Date: Wed, 26 Nov 2025 16:52:23 +0200
From: Jani Nikula <jani.nikula@...ux.intel.com>
To: Yaroslav <iam@....ch>, Yaroslav Bolyukin <iam@...h.pw>, Ville
 Syrjälä
 <ville.syrjala@...ux.intel.com>, Maarten Lankhorst
 <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
 Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
 Simona Vetter <simona@...ll.ch>
Cc: Harry Wentland <harry.wentland@....com>, Leo Li <sunpeng.li@....com>,
 Rodrigo Siqueira <siqueira@...lia.com>, Alex Deucher
 <alexander.deucher@....com>, Christian König
 <christian.koenig@....com>,
 Wayne Lin <Wayne.Lin@....com>, amd-gfx@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v6 4/7] drm/edid: parse DSC DPP passthru support flag
 for mode VII timings

On Wed, 26 Nov 2025, Yaroslav <iam@....ch> wrote:
> On 2025-11-26 15:19, Jani Nikula wrote:
>> On Wed, 26 Nov 2025, Yaroslav Bolyukin <iam@...h.pw> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ