]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: media: atomisp: reduce load_primary_binaries() stack usage
authorArnd Bergmann <arnd@arndb.de>
Wed, 25 Mar 2026 12:59:43 +0000 (13:59 +0100)
committerSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 20 May 2026 10:15:08 +0000 (13:15 +0300)
commitf4d51e55dd47ef467fbe37d8575e20eee41b092d
tree16bcec4a40a9f4c8d219d45670cb8a14813f9ebe
parentf14d52b67e63993e2d184da5f49d884d527dd475
staging: media: atomisp: reduce load_primary_binaries() stack usage

The load_primary_binaries() function is overly complex and has som large
variables on the stack, which can cause warnings depending on CONFIG_FRAME_WARN
setting:

drivers/staging/media/atomisp/pci/sh_css.c: In function 'load_primary_binaries':
drivers/staging/media/atomisp/pci/sh_css.c:5260:1: error: the frame size of 1560 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]

Half of the stack usage is for the prim_descr[] array, but only one
member of the array is used at any given time.

Reduce the stack usage by turning the array into a single structure.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
drivers/staging/media/atomisp/pci/sh_css.c