linux/drivers/media/usb
Arnd Bergmann 374aceef59 pvrusb2: reduce stack usage pvr2_eeprom_analyze()
commit 6830733d53 upstream.

The driver uses a relatively large data structure on the stack, which
showed up on my radar as we get a warning with the "latent entropy"
GCC plugin:

drivers/media/usb/pvrusb2/pvrusb2-eeprom.c:153:1: error: the frame size of 1376 bytes is larger than 1152 bytes [-Werror=frame-larger-than=]

The warning is usually hidden as we raise the warning limit to 2048
when the plugin is enabled, but I'd like to lower that again in the
future, and making this function smaller helps to do that without
build regressions.

Further analysis shows that putting an 'i2c_client' structure on
the stack is not really supported, as the embedded 'struct device'
is not initialized here, and we are only saved by the fact that
the function that is called here does not use the pointer at all.

Fixes: d855497edb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-06-24 07:11:15 +02:00
..
airspy [media] usb: constify vb2_ops structures 2016-09-19 16:20:35 -03:00
as102 media: usb: as102: as102_usb_drv: don't print error when allocating urb fails 2016-08-30 19:13:53 +02:00
au0828 [media] rc: split nec protocol into its three variants 2016-09-22 11:46:49 -03:00
b2c2 [media] flexcop-usb: don't use stack for DMA 2016-10-14 12:52:29 -03:00
cpia2 [media] cpia2_usb: don't use stack for DMA 2016-10-14 12:52:27 -03:00
cx231xx cx231xx-cards: fix NULL-deref at probe 2017-05-25 15:44:42 +02:00
dvb-usb dw2102: limit messages to buffer size 2017-05-25 15:44:42 +02:00
dvb-usb-v2 dvb-usb-v2: avoid use-after-free 2017-04-21 09:31:23 +02:00
em28xx [media] constify i2c_algorithm structures 2016-09-19 16:27:02 -03:00
go7007 [media] constify i2c_algorithm structures 2016-09-19 16:27:02 -03:00
gspca gspca: konica: add missing endpoint sanity check 2017-05-25 15:44:41 +02:00
hackrf [media] usb: constify vb2_ops structures 2016-09-19 16:20:35 -03:00
hdpvr Merge branch 'akpm' (patches from Andrew) 2016-10-11 17:34:10 -07:00
msi2500 [media] usb: constify vb2_ops structures 2016-09-19 16:20:35 -03:00
pvrusb2 pvrusb2: reduce stack usage pvr2_eeprom_analyze() 2017-06-24 07:11:15 +02:00
pwc [media] usb: constify vb2_ops structures 2016-09-19 16:20:35 -03:00
s2255 [media] s2255drv: don't use stack for DMA 2016-10-14 12:52:28 -03:00
siano siano: make it work again with CONFIG_VMAP_STACK 2017-02-23 17:44:35 +01:00
stk1160 [media] constify i2c_algorithm structures 2016-09-19 16:27:02 -03:00
stkwebcam [media] stk-webcam: don't use stack for DMA 2016-10-14 12:52:29 -03:00
tm6000 [media] usb: constify snd_pcm_ops structures 2016-09-19 16:19:10 -03:00
ttusb-budget [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
ttusb-dec [media] ttusb_dec: avoid the risk of go past buffer 2016-09-22 14:14:22 -03:00
usbtv [media] usb: constify vb2_ops structures 2016-09-19 16:20:35 -03:00
usbvision usbvision: fix NULL-deref at probe 2017-05-25 15:44:39 +02:00
uvc uvcvideo: uvc_scan_fallback() for webcams with broken chain 2017-03-22 12:43:38 +01:00
zr364xx zr364xx: enforce minimum size when reading header 2017-05-25 15:44:42 +02:00
Kconfig [media] tlg2300: move to staging in preparation for removal 2014-12-16 23:21:43 -02:00
Makefile [media] tlg2300: move to staging in preparation for removal 2014-12-16 23:21:43 -02:00