Skip to content

Commit 957a36c

Browse files
ColinIanKingtiwai
authored andcommitted
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>
1 parent 541b8a2 commit 957a36c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/core/sound_kunit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static void _test_fill_silence(struct kunit *test, struct snd_format_test_data *
167167

168168
static void test_format_fill_silence(struct kunit *test)
169169
{
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 };
171171
u8 *buffer;
172172
u32 i, j;
173173

0 commit comments

Comments
 (0)