Arnd Bergmann ed514ecf4f media: dvb-frontends: avoid stack overflow warnings with clang
[ Upstream commit 7a4cf27d1f0538f779bf31b8c99eda394e277119 ]

A previous patch worked around a KASAN issue in stv0367, now a similar
problem showed up with clang:

drivers/media/dvb-frontends/stv0367.c:1222:12: error: stack frame size (3624) exceeds limit (2048) in 'stv0367ter_set_frontend' [-Werror,-Wframe-larger-than]
 1214 | static int stv0367ter_set_frontend(struct dvb_frontend *fe)

Rework the stv0367_writereg() function to be simpler and mark both
register access functions as noinline_for_stack so the temporary
i2c_msg structures do not get duplicated on the stack when KASAN_STACK
is enabled.

Fixes: 3cd890dbe2a4 ("media: dvb-frontends: fix i2c access helpers for KASAN")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:17:14 -04:00
..
2020-01-08 11:44:44 +01:00
2020-11-16 10:31:16 +01:00
2020-11-16 10:31:16 +01:00
2020-11-16 10:31:16 +01:00
2020-11-16 10:31:16 +01:00
2020-11-16 10:31:16 +01:00
2020-11-16 10:31:16 +01:00
2020-11-16 10:31:16 +01:00
2022-03-18 05:58:35 +01:00
2020-11-16 10:31:16 +01:00
2020-11-16 10:31:16 +01:00
2023-09-01 12:21:32 -07:00
2020-11-16 10:31:16 +01:00
2020-11-16 10:31:16 +01:00
2020-11-16 10:31:16 +01:00