OpenCloudOS-Kernel/drivers/staging
Lorenzo Stoakes 1705209b3e minmax: reduce min/max macro expansion in atomisp driver
commit 7c6a3a65ace70f12b27b1a27c9a69cb791dc6e91 upstream.

Avoid unnecessary nested min()/max() which results in egregious macro
expansion.

Use clamp_t() as this introduces the least possible expansion, and turn
the {s,u}DIGIT_FITTING() macros into inline functions to avoid the
nested expansion.

This resolves an issue with slackware 15.0 32-bit compilation as
reported by Richard Narron.

Presumably the min/max fixups would be difficult to backport, this patch
should be easier and fix's Richard's problem in 5.15.

Reported-by: Richard Narron <richard@aaazen.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Closes: https://lore.kernel.org/all/4a5321bd-b1f-1832-f0c-cea8694dc5aa@aaazen.com/
Fixes: 867046cc7027 ("minmax: relax check to allow comparison between unsigned arguments and signed constants")
Cc: stable@vger.kernel.org
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-18 19:24:07 +02:00
..
axis-fifo staging: Explicitly include correct DT includes 2023-07-27 10:01:07 +02:00
board
emxx_udc
fbtft Linux 6.5-rc7 2023-08-24 07:26:06 +10:00
fieldbus staging: fieldbus: arcx-anybus: Remove redundant of_match_ptr() 2023-08-11 23:28:04 +02:00
gdm724x tty: gdm724x: use min_t() for size_t varable and a constant 2023-08-22 14:53:53 +02:00
greybus greybus: arche-ctrl: move device table to its right location 2024-06-12 11:12:17 +02:00
iio staging: iio: frequency: ad9834: Validate frequency parameter value 2024-09-12 11:11:40 +02:00
ks7010 staging: ks7010: disable bh on tx_dev_lock 2024-08-29 17:33:26 +02:00
media minmax: reduce min/max macro expansion in atomisp driver 2024-09-18 19:24:07 +02:00
most staging: Explicitly include correct DT includes 2023-07-27 10:01:07 +02:00
nvec
octeon
olpc_dcon staging: olpc_dcon: Switch i2c driver back to use .probe() 2023-05-28 10:15:27 +01:00
pi433 staging: Explicitly include correct DT includes 2023-07-27 10:01:07 +02:00
qlge
rtl8192e staging: rtl8192e: Annotate struct rtllib_txb with __counted_by 2023-08-22 15:48:05 +02:00
rtl8192u staging: rtl8192u: Fix keyidx assignment within if condition 2023-07-27 10:00:02 +02:00
rtl8712 staging: rtl8712: fix race condition 2023-08-04 16:20:13 +02:00
rtl8723bs staging: rtl8723bs: Use helpers to check broadcast and multicast Ether addresses 2023-08-22 15:47:17 +02:00
rts5208 staging: rts5208: Correct line ending with '(' 2023-07-27 10:00:19 +02:00
sm750fb Staging driver changes for 6.6-rc1 2023-09-01 09:27:29 -07:00
vc04_services staging: vc04_services: fix information leak in create_component() 2024-04-03 15:28:59 +02:00
vme_user staging: vme_user: fix check lines should not end with a '(' 2023-08-22 15:47:35 +02:00
vt6655 staging: vt6655: replace camel case by snake case 2023-08-22 15:44:33 +02:00
vt6656
wlan-ng Fix nomenclature for USB and PCI wireless devices 2023-08-25 12:56:49 +03:00
Kconfig
Makefile