Commit 8526373
staging: media: atomisp: reduce load_primary_binaries() stack usage
commit f4d51e5 upstream.
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: a49d253 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent b7da3b9 commit 8526373
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5224 | 5224 | | |
5225 | 5225 | | |
5226 | 5226 | | |
5227 | | - | |
5228 | 5227 | | |
5229 | 5228 | | |
5230 | 5229 | | |
| |||
5394 | 5393 | | |
5395 | 5394 | | |
5396 | 5395 | | |
| 5396 | + | |
5397 | 5397 | | |
5398 | 5398 | | |
5399 | 5399 | | |
5400 | 5400 | | |
5401 | 5401 | | |
5402 | | - | |
| 5402 | + | |
5403 | 5403 | | |
5404 | 5404 | | |
5405 | | - | |
| 5405 | + | |
5406 | 5406 | | |
5407 | 5407 | | |
5408 | 5408 | | |
| |||
0 commit comments