From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C51AC307ACD; Mon, 22 Sep 2025 12:40:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758544855; cv=none; b=XKabR2jmyjU66wq2kLx7+Vbc5ZW5TiuToLVlNoe+Tt+SIhrSLLNlPcsI+cxu97IQIS21iAXA0YxlaFccJWMJ/uT3EajDodGSTRgLjh1VvXfCjVVwigHtDMpnD6HX+WakQ9eaQSxG7IGAYwFh5BnyelNHV8VLUzp3EUAdXVIh3L0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758544855; c=relaxed/simple; bh=9EnrkUTRC3WbuAFf4lnbSzwEyBeWACdeCsxOYAwx2mg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YoODE7SQlq0b/mvro9GxWmFCpwAn2KfQfPcH2vjpUvw4PnyeXCuLQHnC1txz84oUZPyyM07j0sAYTRS+rZ56vWu6bJfhmLPCSofLFLosvmCPqU1FVmBLM4Hn011EUYsMCpjLGhqcEPyhrpo5TwgjICEB1+nnqaGGGVCGx2zAV8M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ozGcCAjU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ozGcCAjU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 133B5C4CEF0; Mon, 22 Sep 2025 12:40:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758544855; bh=9EnrkUTRC3WbuAFf4lnbSzwEyBeWACdeCsxOYAwx2mg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ozGcCAjUuLnf1RgOGckV6AH965oAp/K1TY2eSbmKl/C4fNB3qo4dlWtmlSINDjjOP knEuUlp18RwYdjWTm6QWnSR+v+UHtYkNhp60v4aYebb3MOmMXSuvvJNHmE5LFQXLaU 0/BlWu+1DnvN/JJh+naIMq1n1GDWeuu66LQM7q98= Date: Mon, 22 Sep 2025 14:40:48 +0200 From: Greg KH To: David.Laight@aculab.com, Rodrigo.Siqueira@amd.com, Xinhui.Pan@amd.com, agk@redhat.com, airlied@gmail.com, akpm@linux-foundation.org, alexander.deucher@amd.com, alexandre.torgue@foss.st.com, amd-gfx@lists.freedesktop.org, andriy.shevchenko@linux.intel.com, anton.ivanov@cambridgegreys.com, arnd@kernel.org, artur.paszkiewicz@intel.com, bp@alien8.de, christian.koenig@amd.com, clm@fb.com, daniel@ffwll.ch, dave.hansen@linux.intel.com, davem@davemloft.net, dm-devel@lists.linux.dev, dmitry.torokhov@gmail.com, dri-devel@lists.freedesktop.org, dsahern@kernel.org, dsterba@suse.com, edumazet@google.com, evan.quan@amd.com, farbere@amazon.com, harry.wentland@amd.com, hdegoede@redhat.com, hpa@zytor.com, ilpo.jarvinen@linux.intel.com, james.morse@arm.com, jdelvare@suse.com, jejb@linux.ibm.com, jernej.skrabec@gmail.com, joabreu@synopsys.com, johannes@sipsolutions.net, josef@toxicpanda.com, keescook@chromium.org, krzysztof.kozlowski@linaro.org, kuba@kernel.org, linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-staging@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, linux-um@lists.infradead.org, linux@rasmusvillemoes.dk, linux@roeck-us.net, lorenzo.stoakes@oracle.com, luc.vanoostenryck@gmail.com, luto@kernel.org, maarten.lankhorst@linux.intel.com, mailhol.vincent@wanadoo.fr, malattia@linux.it, markgross@kernel.org, martin.petersen@oracle.com, mchehab@kernel.org, mcoquelin.stm32@gmail.com, mhiramat@kernel.org, minchan@kernel.org, mingo@redhat.com, mkl@pengutronix.de, mripard@kernel.org, pabeni@redhat.com, peterz@infradead.org, pmladek@suse.com, qiuxu.zhuo@intel.com, richard@nod.at, rostedt@goodmis.org, rric@kernel.org, sakari.ailus@linux.intel.com, samuel@sholland.org, senozhatsky@chromium.org, shuah@kernel.org, snitzer@kernel.org, sunpeng.li@amd.com, tglx@linutronix.de, tony.luck@intel.com, torvalds@linux-foundation.org, tzimmermann@suse.de, wad@chromium.org, wens@csie.org, wg@grandegger.com, x86@kernel.org Cc: stable-commits@vger.kernel.org Subject: Re: Patch "minmax: make generic MIN() and MAX() macros available everywhere" has been added to the 6.6-stable tree Message-ID: <2025092209-owl-whisking-03e3@gregkh> References: <20250922103241.16213-5-farbere@amazon.com> <2025092200-reverb-stumble-8578@gregkh> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <2025092200-reverb-stumble-8578@gregkh> On Mon, Sep 22, 2025 at 02:27:00PM +0200, gregkh@linuxfoundation.org wrote: >=20 > This is a note to let you know that I've just added the patch titled >=20 > minmax: make generic MIN() and MAX() macros available everywhere >=20 > to the 6.6-stable tree which can be found at: > http://www.kernel.org/git/?p=3Dlinux/kernel/git/stable/stable-queue.g= it;a=3Dsummary >=20 > The filename of the patch is: > minmax-make-generic-min-and-max-macros-available-everywhere.patch > and it can be found in the queue-6.6 subdirectory. >=20 > If you, or anyone else, feels it should not be added to the stable tree, > please let know about it. >=20 >=20 > >From prvs=3D353d6d59a=3Dfarbere@amazon.com Mon Sep 22 12:35:15 2025 > From: Eliav Farber > Date: Mon, 22 Sep 2025 10:32:30 +0000 > Subject: minmax: make generic MIN() and MAX() macros available everywhere > To: , , , , , , , , , , , , = , , , , , , , , , , , , , , , , , , , , , , , , , = , , , , = , mazet@google.com>, , , , , , , , , = , , , , , , , , , , , , , , , , , = , , , , , , , , , , , , = p.org>, , = , , , , , , , , , , , , , , , , , > Cc: Linus Torvalds , David Laight , Lorenzo Stoakes > Message-ID: <20250922103241.16213-5-farbere@amazon.com> >=20 > From: Linus Torvalds >=20 > [ Upstream commit 1a251f52cfdc417c84411a056bc142cbd77baef4 ] >=20 > This just standardizes the use of MIN() and MAX() macros, with the very > traditional semantics. The goal is to use these for C constant > expressions and for top-level / static initializers, and so be able to > simplify the min()/max() macros. >=20 > These macro names were used by various kernel code - they are very > traditional, after all - and all such users have been fixed up, with a > few different approaches: >=20 > - trivial duplicated macro definitions have been removed >=20 > Note that 'trivial' here means that it's obviously kernel code that > already included all the major kernel headers, and thus gets the new > generic MIN/MAX macros automatically. >=20 > - non-trivial duplicated macro definitions are guarded with #ifndef >=20 > This is the "yes, they define their own versions, but no, the include > situation is not entirely obvious, and maybe they don't get the > generic version automatically" case. >=20 > - strange use case #1 >=20 > A couple of drivers decided that the way they want to describe their > versioning is with >=20 > #define MAJ 1 > #define MIN 2 > #define DRV_VERSION __stringify(MAJ) "." __stringify(MIN) >=20 > which adds zero value and I just did my Alexander the Great > impersonation, and rewrote that pointless Gordian knot as >=20 > #define DRV_VERSION "1.2" >=20 > instead. >=20 > - strange use case #2 >=20 > A couple of drivers thought that it's a good idea to have a random > 'MIN' or 'MAX' define for a value or index into a table, rather than > the traditional macro that takes arguments. >=20 > These values were re-written as C enum's instead. The new > function-line macros only expand when followed by an open > parenthesis, and thus don't clash with enum use. >=20 > Happily, there weren't really all that many of these cases, and a lot of > users already had the pattern of using '#ifndef' guarding (or in one > case just using '#undef MIN') before defining their own private version > that does the same thing. I left such cases alone. >=20 > Cc: David Laight > Cc: Lorenzo Stoakes > Signed-off-by: Linus Torvalds > Signed-off-by: Eliav Farber > Signed-off-by: Greg Kroah-Hartman > --- > arch/um/drivers/mconsole_user.c | = 2=20 > drivers/edac/skx_common.h | = 1=20 > drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c | = 2=20 > drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h | = 14 ++++- Oops, nope, this patch breaks the amd driver's build :( I'll drop this patch and stop here on this patch series. Please fix this up and resend the remaining ones after it builds properly. thanks, greg k-h