]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
minmax: don't use max() in situations that want a C constant expression
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Oct 2025 12:15:10 +0000 (12:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:21 +0000 (11:56 +0200)
commit9f6349350e439befaa5b8530c471148fa70a733f
tree6f8a6f36c0096e17dbd9708f59dbda77615be410
parent3d17701c156579969470e58b3a906511f8bc018d
minmax: don't use max() in situations that want a C constant expression

[ Upstream commit cb04e8b1d2f24c4c2c92f7b7529031fc35a16fed ]

We only had a couple of array[] declarations, and changing them to just
use 'MAX()' instead of 'max()' fixes the issue.

This will allow us to simplify our min/max macros enormously, since they
can now unconditionally use temporary variables to avoid using the
argument values multiple times.

Cc: David Laight <David.Laight@aculab.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Eliav Farber <farbere@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
drivers/input/touchscreen/cyttsp4_core.c
drivers/irqchip/irq-sun6i-r.c
drivers/md/dm-integrity.c
fs/btrfs/tree-checker.c
lib/vsprintf.c