]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: mxl5005s: reduce stack usage in MXL5005_ControlInit
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Jun 2025 11:14:23 +0000 (13:14 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 16 Mar 2026 10:51:54 +0000 (11:51 +0100)
commitad4729225d93f71f50710ed1757f619845b0082e
treedc8d583ec39416de395df7acb301af3ade5fcd29
parentf6390408a846aacc2171c17d88b062e202d84e86
media: mxl5005s: reduce stack usage in MXL5005_ControlInit

This function initializes two large structures with arrays. On at least
parisc, the specific code sequence here leads to a badly misoptimized
output from the compiler along with a warning about the resulting
excessive stack usage from many spilled variables:

drivers/media/tuners/mxl5005s.c: In function 'MXL5005_ControlInit.isra':
drivers/media/tuners/mxl5005s.c:1660:1: warning: the frame size of 1400 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Splitting this one function into two functions avoids this because there
are few temporaries that can be spilled to the stack in each of the smaller
structures, so this avoids the warning and also improves readability.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/tuners/mxl5005s.c