OSDN Git Service

[media] dibusb-common: Don't use dynamic static allocation
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 2 Nov 2013 10:23:49 +0000 (07:23 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 8 Nov 2013 11:45:44 +0000 (09:45 -0200)
commit1d7fa359d4c0fbb2756fa01cc47212908d90b7b0
tree68a4eae0b012db593d04c6b8ba4c75b1c14b1272
parent64f7ef8afbf89f3c72c4d2472e4914ca198c0668
[media] dibusb-common: Don't use dynamic static allocation

Dynamic static allocation is evil, as Kernel stack is too low, and
compilation complains about it on some archs:
drivers/media/usb/dvb-usb/dibusb-common.c:124:1: warning: 'dibusb_i2c_msg' uses dynamic stack allocation [enabled by default]
Instead, let's enforce a limit for the buffer to be the max size of
a control URB payload data (64 bytes).

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/dvb-usb/dibusb-common.c