From: Arnd Bergmann <arnd@xxxxxxxx>Reviewed-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
Having 1280 bytes of local variables on the stack exceeds the limit
on 32-bit architectures:
drivers/firmware/cirrus/test/cs_dsp_test_bin.c: In function 'bin_patch_mixed_packed_unpacked_random':
drivers/firmware/cirrus/test/cs_dsp_test_bin.c:2097:1: error: the frame size of 1784 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
Use dynamic allocation for the largest two here.
Fixes: dd0b6b1f29b9 ("firmware: cs_dsp: Add KUnit testing of bin file download")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
v2 changes:
- use kunit_kmalloc() as suggested by Richard Fitzgerald
- use KUNIT_ASSERT_NOT_NULL
---
.../firmware/cirrus/test/cs_dsp_test_bin.c | 33 +++++++++++--------
1 file changed, 19 insertions(+), 14 deletions(-)