WSL2-Linux-Kernel/drivers/media/pci
Aurelien Jarno f80d537d4c 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>
2024-09-04 13:23:31 +02:00
..
b2c2 media: b2c2: Add missing check in flexcop_pci_isr: 2022-01-27 11:04:27 +01:00
bt8xx media: bttv: fix use after free error due to btv->timeout timer 2023-11-20 11:08:27 +01:00
cobalt media: cobalt: Use FIELD_GET() to extract Link Width 2023-11-28 16:56:20 +00:00
cx18
cx88 media: cx88: Fix a null-ptr-deref bug in buffer_prepare() 2022-10-26 12:35:45 +02:00
cx23885 media: pci: cx23885: check cx23885_vdev_init() return 2024-09-04 13:23:24 +02:00
cx25821 media: cx25821: Fix the warning when removing the module 2022-06-09 10:22:33 +02:00
ddbridge media: ddbridge: fix an error code problem in ddb_probe 2024-02-23 08:54:48 +01:00
dm1105 media: dm1105: Fix use after free bug in dm1105_remove due to race condition 2023-05-11 23:00:24 +09:00
dt3155
intel media: ipu3-cio2: Request IRQ earlier 2024-06-16 13:39:29 +02:00
ivtv ivtv: fix incorrect device_caps for ivtvfb 2022-04-08 14:23:21 +02:00
mantis
meye
netup_unidvb media: netup_unidvb: fix irq init by register it at the end of probe 2023-06-09 10:32:23 +02:00
ngene media: ngene: Add dvb_ca_en50221_init return value check 2024-06-16 13:39:28 +02:00
pluto2
pt1
pt3
saa7134 saa7134: Unchecked i2c_transfer function result fixed 2024-08-19 05:45:00 +02:00
saa7146 media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach() 2022-01-27 11:04:42 +01:00
saa7164 media: saa7164: fix missing pci_disable_device() 2022-12-31 13:14:16 +01:00
smipcie
solo6x10 media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c) 2024-09-04 13:23:31 +02:00
sta2x11 media: sta2x11: fix irq handler cast 2024-04-13 13:01:45 +02:00
ttpci media: ttpci: fix two memleaks in budget_av_attach 2024-03-26 18:21:30 -04:00
tw68 media: pci: tw68: Fix null-ptr-deref bug in buf prepare and finish 2023-05-24 17:36:43 +01:00
tw686x media: tw686x: Fix memory leak in tw686x_video_init 2022-08-17 14:23:24 +02:00
tw5864
Kconfig
Makefile