linux/drivers/media/pci
Aurelien Jarno a16206d0d7 media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)
commit 31e97d7c9a 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>
History 2024-01-25 15:45:15 -08:00
..
b2c2 media: b2c2: Add missing check in flexcop_pci_isr: 2021-11-19 15:40:09 +00:00
bt8xx media: bttv: add back vbi hack 2024-01-25 15:45:02 -08:00
cobalt media: cobalt: Use FIELD_GET() to extract Link Width 2023-10-07 10:55:45 +02:00
cx18 media: pci: cx18: if cx == NULL, then don't use it. 2023-10-13 11:33:22 +02:00
cx88 media: cx88: add IR remote support for NotOnlyTV LV3H 2022-09-24 11:21:43 +02:00
cx23885 media: cx23885: debug cosmetics 2023-08-10 07:58:36 +02:00
cx25821 cx25821: remove unused cx25821_video_wakeup() declaration 2022-10-24 19:03:52 +02:00
ddbridge media: dvb: symbol fixup for dvb_attach() 2023-09-09 08:15:11 +01:00
dm1105 media: add HAS_IOPORT dependencies 2023-06-28 11:09:25 +02:00
dt3155 media: v4l: ioctl: Set bus_info in v4l_querycap() 2022-04-24 08:07:08 +01:00
intel media updates for v6.7-rc1 2023-11-06 15:06:06 -08:00
ivtv media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers 2023-07-25 09:24:30 +02:00
mantis media: mantis: Kconfig: add depends on DVB_CORE for MANTIS_CORE 2022-11-25 10:04:11 +00:00
mgb4 media: pci: mgb4: add COMMON_CLK dependency 2023-11-16 13:59:31 +01:00
netup_unidvb media: netup_unidvb: fix irq init by register it at the end of probe 2023-05-14 06:30:13 +01:00
ngene media: media/pci/ngene/ngene.h: remove #ifdef NGENE_V4L 2022-08-29 15:37:30 +02:00
pluto2 media: switch from 'pci_' to 'dma_' API 2021-09-30 10:07:55 +02:00
pt1 media: switch from 'pci_' to 'dma_' API 2021-09-30 10:07:55 +02:00
pt3 media: pt3: Use dma_set_mask_and_coherent() and simplify code 2022-12-07 17:58:46 +01:00
saa7134 media: Fix indentation issues introduced by subdev-wide state struct 2023-04-12 09:46:06 +02:00
saa7146 media: pci: saa7146: advertise only those TV standard that are supported 2023-04-15 08:56:05 +01:00
saa7164 media: pci: saa7164: replace BUG with error return 2023-07-25 09:24:31 +02:00
smipcie media: smipcie: fix interrupt handling and IR timeout 2021-02-05 23:41:25 +01:00
solo6x10 media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c) 2024-01-25 15:45:15 -08:00
sta2x11 gpiolib: remove legacy gpio_export() 2023-03-06 12:33:01 +02:00
ttpci media: ttpci: remove unnecessary (void*) conversions 2023-07-19 12:57:47 +02:00
tw68 media: pci: tw68: Fix null-ptr-deref bug in buf prepare and finish 2023-03-19 22:56:45 +01:00
tw686x media: pci: tw686x: no need to check 'next' 2023-06-09 16:09:10 +01:00
tw5864 media: tw5864: Convert to use managed functions pcim* and devm* 2022-06-20 10:30:34 +01:00
zoran media: zoran: increase name size 2023-09-27 10:47:22 +02:00
Kconfig media: pci: mgb4: Added Digiteq Automotive MGB4 driver 2023-10-07 10:51:58 +02:00
Makefile media: pci: mgb4: Added Digiteq Automotive MGB4 driver 2023-10-07 10:51:58 +02:00