Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: kunit: make read-only array buf_samples static const

Don't populate the read-only array buf_samples on the stack at
run time, instead make it static const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Acked-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240425160754.114716-1-colin.i.king@gmail.com>

authored by

Colin Ian King and committed by
Takashi Iwai
957a36c4 541b8a26

+1 -1
+1 -1
sound/core/sound_kunit.c
··· 167 167 168 168 static void test_format_fill_silence(struct kunit *test) 169 169 { 170 - u32 buf_samples[] = { 10, 20, 32, 64, 129, SILENCE_BUFFER_MAX_FRAMES }; 170 + static const u32 buf_samples[] = { 10, 20, 32, 64, 129, SILENCE_BUFFER_MAX_FRAMES }; 171 171 u8 *buffer; 172 172 u32 i, j; 173 173