[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c081c07-2833-4fa9-96fb-88a7295d2c14@wanadoo.fr>
Date: Fri, 7 Mar 2025 01:08:01 +0900
From: Vincent Mailhol <mailhol.vincent@...adoo.fr>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Yury Norov <yury.norov@...il.com>,
Lucas De Marchi <lucas.demarchi@...el.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>, Tvrtko Ursulin
<tursulin@...ulin.net>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, intel-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, Andi Shyti <andi.shyti@...ux.intel.com>,
David Laight <David.Laight@...lab.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Jani Nikula <jani.nikula@...el.com>
Subject: Re: [PATCH v5 2/7] bits: introduce fixed-type genmasks
On 06/03/2025 à 22:08, Andy Shevchenko wrote:
> On Thu, Mar 06, 2025 at 08:29:53PM +0900, Vincent Mailhol via B4 Relay wrote:
>> From: Yury Norov <yury.norov@...il.com>
>>
>> Add GENMASK_TYPE() which generalizes __GENMASK() to support different
>> types, and implement fixed-types versions of GENMASK() based on it.
>> The fixed-type version allows more strict checks to the min/max values
>> accepted, which is useful for defining registers like implemented by
>> i915 and xe drivers with their REG_GENMASK*() macros.
>>
>> The strict checks rely on shift-count-overflow compiler check to fail
>> the build if a number outside of the range allowed is passed.
>> Example:
>>
>> #define FOO_MASK GENMASK_U32(33, 4)
>>
>> will generate a warning like:
>>
>> include/linux/bits.h:51:27: error: right shift count >= width of type [-Werror=shift-count-overflow]
>> 51 | type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
>> | ^~
>
> Code LGTM
Does this mean I get your Reviewed-by tag? Or will you wait the v6 to
formally give it?
> but just to be sure: you prepared your series using histogram
> diff algo, right?
No, I never used the histogram diff. My git config is extremely boring.
Mostly vanilla.
I remember that Linus even commented on this:
https://lore.kernel.org/all/CAHk-=wiUxm-NZ1si8dXWVTTJ9n3c+1SRTC0V+Lk7hOE4bDVwJQ@mail.gmail.com/
But he made it clear this was *not* a requirement, so I just left the
diff algorithm to the default. Or did I miss any communication that
contributors should now use histogram diff?
Regardless, I do not mind activating it. I just did a:
git config diff.algorithm histogram
The v6 will have histogram diffs.
Yours sincerely,
Vincent Mailhol
Powered by blists - more mailing lists