mirror of https://gitee.com/openkylin/linux.git
f1baab870f
Dynamic static allocation is evil, as Kernel stack is too low, and compilation complains about it on some archs: drivers/media/tuners/e4000.c:50:1: warning: 'e4000_wr_regs' uses dynamic stack allocation [enabled by default] drivers/media/tuners/e4000.c:83:1: warning: 'e4000_rd_regs' uses dynamic stack allocation [enabled by default] drivers/media/tuners/fc2580.c:66:1: warning: 'fc2580_wr_regs.constprop.1' uses dynamic stack allocation [enabled by default] drivers/media/tuners/fc2580.c:98:1: warning: 'fc2580_rd_regs.constprop.0' uses dynamic stack allocation [enabled by default] drivers/media/tuners/tda18212.c:57:1: warning: 'tda18212_wr_regs' uses dynamic stack allocation [enabled by default] drivers/media/tuners/tda18212.c:90:1: warning: 'tda18212_rd_regs.constprop.0' uses dynamic stack allocation [enabled by default] drivers/media/tuners/tda18218.c:60:1: warning: 'tda18218_wr_regs' uses dynamic stack allocation [enabled by default] drivers/media/tuners/tda18218.c:92:1: warning: 'tda18218_rd_regs.constprop.0' uses dynamic stack allocation [enabled by default] Instead, let's enforce a limit for the buffer. Considering that I2C transfers are generally limited, and that devices used on USB has a max data length of 64 bytes for the control URBs. So, it seem safe to use 64 bytes as the hard limit for all those devices. On most cases, the limit is a way lower than that, but this limit is small enough to not affect the Kernel stack, and it is a no brain limit, as using smaller ones would require to either carefully each driver or to take a look on each datasheet. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
e4000.c | ||
e4000.h | ||
e4000_priv.h | ||
fc001x-common.h | ||
fc0011.c | ||
fc0011.h | ||
fc0012-priv.h | ||
fc0012.c | ||
fc0012.h | ||
fc0013-priv.h | ||
fc0013.c | ||
fc0013.h | ||
fc2580.c | ||
fc2580.h | ||
fc2580_priv.h | ||
max2165.c | ||
max2165.h | ||
max2165_priv.h | ||
mc44s803.c | ||
mc44s803.h | ||
mc44s803_priv.h | ||
mt20xx.c | ||
mt20xx.h | ||
mt2060.c | ||
mt2060.h | ||
mt2060_priv.h | ||
mt2063.c | ||
mt2063.h | ||
mt2131.c | ||
mt2131.h | ||
mt2131_priv.h | ||
mt2266.c | ||
mt2266.h | ||
mxl5005s.c | ||
mxl5005s.h | ||
mxl5007t.c | ||
mxl5007t.h | ||
qt1010.c | ||
qt1010.h | ||
qt1010_priv.h | ||
r820t.c | ||
r820t.h | ||
tda827x.c | ||
tda827x.h | ||
tda8290.c | ||
tda8290.h | ||
tda9887.c | ||
tda9887.h | ||
tda18212.c | ||
tda18212.h | ||
tda18218.c | ||
tda18218.h | ||
tda18218_priv.h | ||
tda18271-common.c | ||
tda18271-fe.c | ||
tda18271-maps.c | ||
tda18271-priv.h | ||
tda18271.h | ||
tea5761.c | ||
tea5761.h | ||
tea5767.c | ||
tea5767.h | ||
tua9001.c | ||
tua9001.h | ||
tua9001_priv.h | ||
tuner-i2c.h | ||
tuner-simple.c | ||
tuner-simple.h | ||
tuner-types.c | ||
tuner-xc2028-types.h | ||
tuner-xc2028.c | ||
tuner-xc2028.h | ||
tuner_it913x.c | ||
tuner_it913x.h | ||
tuner_it913x_priv.h | ||
xc4000.c | ||
xc4000.h | ||
xc5000.c | ||
xc5000.h |