linux/drivers/media
Arnd Bergmann 3538aa6ecf [media] tc358743: fix register i2c_rd/wr functions
While testing with CONFIG_UBSAN, I got this warning:

drivers/media/i2c/tc358743.c: In function 'tc358743_probe':
drivers/media/i2c/tc358743.c:1930:1: error: the frame size of 2480 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

The problem is that the i2c_rd8/wr8/rd16/... functions in this driver pass
a pointer to a local variable into a common function, and each call to one
of them adds another variable plus redzone to the stack.

I also noticed that the way this is done is broken on big-endian machines,
as we copy the registers in CPU byte order.

To address both those problems, I'm adding two helper functions for reading
a register of up to 32 bits with correct endianess and change all other
functions to use that instead. Just to be sure we don't get the problem
back with changed optimizations in gcc, I'm also marking the new functions
as 'noinline', although my tests with gcc-7 don't require that.

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>
2017-03-03 07:22:43 -03:00
..
cec Linux 4.10 2017-02-22 07:44:15 -03:00
common [media] b2c2: use IS_REACHABLE() instead of open-coding it 2017-02-03 07:12:59 -02:00
dvb-core [media] add Hama Hybrid DVB-T Stick support 2017-02-08 10:54:58 -02:00
dvb-frontends [media] zd1301: fix building interface driver without demodulator 2017-02-08 11:59:39 -02:00
firewire [media] firewire: don't break long lines 2016-10-21 10:06:00 -02:00
i2c [media] tc358743: fix register i2c_rd/wr functions 2017-03-03 07:22:43 -03:00
mmc
pci [media] ttpci: address stringop overflow warning 2017-02-08 11:46:07 -02:00
platform [media] vivid: support for contiguous DMA buffers 2017-03-03 07:16:11 -03:00
radio [media] media: radio-cadet, initialize timer with setup_timer 2017-02-03 11:23:51 -02:00
rc [media] mce_kbd: add missing keys from UK layout 2017-02-03 14:23:37 -02:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners [media] mt2060: implement sleep 2017-02-03 06:55:46 -02:00
usb [media] mxl111sf: reduce stack usage in init function 2017-03-03 07:21:48 -03:00
v4l2-core [media] v4l: of: check for unique lanes in data-lanes and clock-lanes 2017-02-08 10:32:11 -02:00
cec-edid.c [media] cec-edid: check for IEEE identifier 2016-08-22 14:04:51 -03:00
Kconfig [media] Kconfig: fix breakages when DVB_CORE is not selected 2016-11-18 17:59:17 -02:00
Makefile [media] cec: move the CEC framework out of staging and to media 2016-11-16 15:40:20 -02:00
media-device.c [media] media: Rename graph and pipeline structs and functions 2017-01-27 16:13:24 -02:00
media-devnode.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
media-entity.c [media] media: entity: Add debug information to graph walk 2017-01-30 11:33:26 -02:00