From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BDFDCAC5AD for ; Mon, 22 Sep 2025 12:41:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 770518E0008; Mon, 22 Sep 2025 08:40:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 747F18E0001; Mon, 22 Sep 2025 08:40:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 65DC78E0008; Mon, 22 Sep 2025 08:40:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 4F0118E0001 for ; Mon, 22 Sep 2025 08:40:59 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D2D341DE0DF for ; Mon, 22 Sep 2025 12:40:58 +0000 (UTC) X-FDA: 83916845796.10.336A1FA Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf16.hostedemail.com (Postfix) with ESMTP id A8BE718000F for ; Mon, 22 Sep 2025 12:40:56 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=ozGcCAjU; spf=pass (imf16.hostedemail.com: domain of gregkh@linuxfoundation.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1758544856; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=l4jxOVV/D6bef+EYPYy7phqqaUGkMOYda3bX+wV88V0=; b=qLzlqqliCG+mQ4hCqn9RZFz9FhJyLQOnOMtKh6q4pQDnu/YBGdj+R62dWxhbcoPly4n38x 4s3fzkoaBZWT+A86ZLtZhtukKPvqkNxXJHeMgCSYkf9SkAUt1+N7q70vX6xg66AGDW3JbR N1+YF67EIiIWAO9h450lcrtlNfpfg9k= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1758544856; a=rsa-sha256; cv=none; b=QnC6B/u8qtb7mk/nvcNUr/ghLi7O8KBgRIL/WlaG+uqe5Cdk1kmtsPVxq5f7db1W6QDYLl suhx4Q8b5ojI/nBj9wibDb7fLmLPXB+CdhvmVBX0dOdWGFs346lNsiGLgiGHaetBND8A5E NzUyWZWLdSovMzR6FerzvC1rUzbw24M= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=ozGcCAjU; spf=pass (imf16.hostedemail.com: domain of gregkh@linuxfoundation.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 6964B44352; Mon, 22 Sep 2025 12:40:55 +0000 (UTC) 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> 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> X-Rspamd-Queue-Id: A8BE718000F X-Stat-Signature: jr3pwu7wa9bnci3ez3p5gujiu94qjw3g X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1758544856-38076 X-HE-Meta: U2FsdGVkX19dQHhhfxYWRk7jgjMCQ4Zu9DJVb12TEjr3lQ5MUnQeVklpkgqa+M8OYpSO0kHkpv0+aEU9S0vuokOWunKoJ5piPXECInUCMlBhWzz1s4wPlaA5rHZSbTOuSIZwD9v+F3dfSmL6NEQxP5nKdnASQR5Aiy4b4mdzEhfuYnYifqYflj1bbsoKr5FF1zL+oXDN1E68hXlf/Jh0bFx7+dFWDy+fXwKip/igICOowy5eU7VA+aXppjYA7++dYHMAxYCMCmHFlYVjPpiL3msktqfVU1B49KdbrKVtkWy9nWIJDSD2pn0dtfbsYNrTYls4TrkNh1+8s5lCAIyDk+MWaIn3OXeN8e0Xyn0IMHF8D1lF0DKXesqw4sKAYID2UsX/RZH7ixqnRbDBeF7/nQxiEFFg9J2Aw20WYYCQ8C4ujUSLWB0dYZoVIe5hSRD4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IlVqAZL09/zWRthvReMAK+JeL1fwiqG0gj+Uhxu3ItK5lJDSa7oRzqysrwrXLixW7REFTJhdmNz0se+1mz/qCzRwM5hqNof3rXYXM7jM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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