linux/drivers/staging/media
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
..
atomisp minmax: reduce min/max macro expansion in atomisp driver 2024-09-11 11:07:47 -07:00
av7110 media: av7110: coding style fixes: avoid_externs 2024-06-04 16:19:56 +02:00
deprecated/atmel media: videobuf2: core: Rename min_buffers_needed field in vb2_queue 2023-12-13 17:31:27 +01:00
imx staging: media: imx: Remove duplicate Kconfig dependency 2024-04-10 15:15:30 +02:00
ipu3 media: ipu3: Use MODULE_FIRMWARE to add firmware files metadata 2024-04-30 14:11:17 +01:00
max96712 media: staging: max96712: Store format in subdev active state 2024-06-04 08:31:24 +02:00
meson/vdec media: staging: meson: Fix kerneldoc 2024-02-05 12:57:45 +01:00
omap4iss media: v4l: subdev: Switch to stream-aware state functions 2023-11-23 18:57:47 +01:00
rkvdec media: rkvdec: Hook the (TRY_)DECODER_CMD stateless ioctls 2023-11-23 13:59:33 +01:00
starfive media: staging: media: starfive: Clean pad selection in isp_try_format() 2024-05-03 10:33:16 +01:00
sunxi media: staging: sun6i-isp: Remove redundant printk 2024-05-03 11:07:33 +01:00
tegra-video media: staging: media: tegra-video: Use swap macro 2024-05-03 11:10:00 +01:00
Kconfig media: staging: media: starfive: camss: Add core driver 2023-11-16 12:13:25 +01:00
Makefile media: staging: media: starfive: camss: Add core driver 2023-11-16 12:13:25 +01:00