linux/drivers/staging
Lorenzo Stoakes 7c6a3a65ac minmax: reduce min/max macro expansion in atomisp driver
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: 867046cc70 ("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>
2024-09-11 11:07:47 -07:00
..
axis-fifo staging: axis-fifo: Fix indentation 2024-04-09 17:44:54 +02:00
fbtft staging: fbtft: add missing MODULE_DESCRIPTION() macro 2024-06-24 15:18:01 +02:00
fieldbus driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
gdm724x
greybus Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
iio staging: iio: frequency: ad9834: Validate frequency parameter value 2024-07-29 20:31:23 +01:00
ks7010 staging: ks7010: replace open-coded module_sdio_driver() 2024-04-09 17:45:14 +02:00
media minmax: reduce min/max macro expansion in atomisp driver 2024-09-11 11:07:47 -07:00
most
nvec staging: nvec: Use x instead of x != NULL to improve readability. 2024-07-03 16:15:26 +02:00
octeon
olpc_dcon
rtl8192e staging: rtl8192e: Fix conflicting types error with net_device. 2024-06-27 15:45:16 +02:00
rtl8712 staging: r8712u: remove unused struct 'zero_bulkout_context' 2024-06-04 13:35:31 +02:00
rtl8723bs - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
rts5208 Staging driver changes for 6.10-rc1 2024-05-22 12:11:48 -07:00
sm750fb
vc04_services Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
vme_user Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
vt6655 wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
vt6656 Staging driver updates for 6.11-rc1 2024-07-19 15:46:29 -07:00
Kconfig staging: pi433: Remove unused driver 2024-05-04 18:42:43 +02:00
Makefile staging: pi433: Remove unused driver 2024-05-04 18:42:43 +02:00