]> Pileus Git - ~andy/linux/commit
[media] av7110_hw: Don't use dynamic static allocation
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 2 Nov 2013 08:51:59 +0000 (05:51 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 8 Nov 2013 11:45:41 +0000 (09:45 -0200)
commit5bf30b3bc4ff80ef71a733a1f459cca4fa507892
treeb6579a6ee87ca9fccbe72b8265847942e70d1ffa
parentf7a35df15b1f7de7823946aebc9164854e66ea07
[media] av7110_hw: 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/pci/ttpci/av7110_hw.c:510:1: warning: 'av7110_fw_cmd' uses dynamic stack allocation [enabled by default]
Instead, let's enforce a limit for the buffer.
In the specific case of this driver, the maximum fw command size
is 6 + 2, as checked using:
$ git grep -A1 av7110_fw_cmd drivers/media/pci/ttpci/
So, use 8 for the buffer size.

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/pci/ttpci/av7110_hw.c