kernel_samsung_a53x/drivers/media
Aurelien Jarno 79953b274e media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)
commit 31e97d7c9ae3de072d7b424b2cf706a03ec10720 upstream.

This patch replaces max(a, min(b, c)) by clamp(b, a, c) in the solo6x10
driver.  This improves the readability and more importantly, for the
solo6x10-p2m.c file, this reduces on my system (x86-64, gcc 13):

 - the preprocessed size from 121 MiB to 4.5 MiB;

 - the build CPU time from 46.8 s to 1.6 s;

 - the build memory from 2786 MiB to 98MiB.

In fine, this allows this relatively simple C file to be built on a
32-bit system.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Closes: https://lore.kernel.org/lkml/18c6df0d-45ed-450c-9eda-95160a2bbb8e@gmail.com/
Cc:  <stable@vger.kernel.org> # v6.7+
Suggested-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: David Laight <David.Laight@ACULAB.COM>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-19 15:03:16 +01:00
..
cec media: pulse8-cec: fix data timestamp at pulse8_setup() 2024-11-30 02:33:23 +01:00
common media: v4l2-tpg: prevent the risk of a division by zero 2024-11-30 02:33:23 +01:00
dvb-core media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set 2024-12-17 13:20:51 +01:00
dvb-frontends media: dvb-frontends: dib3000mb: fix uninit-value in dib3000_write_reg 2025-01-15 16:29:47 +01:00
firewire
i2c media: v4l2-core: v4l2-dv-timings: check cvt/gtf result 2024-12-17 13:24:20 +01:00
mc media: mc: mark the media devnode as registered from the, start 2024-11-19 12:27:17 +01:00
mmc
pci media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c) 2025-01-19 15:03:16 +01:00
platform media: qcom: camss: Add check for v4l2_fwnode_endpoint_parse 2025-01-19 00:10:01 +01:00
radio media: wl128x: Fix atomicity violation in fmc_send_cmd() 2024-12-17 13:24:20 +01:00
rc lirc: rc_dev_get_from_fd(): fix file leak 2024-11-23 23:20:18 +01:00
spi
test-drivers media: vivid: fix wrong sizeimage value for mplane 2025-01-19 00:10:02 +01:00
tuners media: xc4000: Fix atomicity violation in xc4000_get_frequency 2024-11-19 09:22:15 +01:00
usb media: uvcvideo: Fix integer overflow calculating timestamp 2025-01-19 15:00:20 +01:00
v4l2-core Reapply "media: v4l: Use interruptible waits" 2024-12-18 11:24:07 +01:00
Kconfig
Makefile