summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2024-04-25 17:07:54 +0100
committerTakashi Iwai <tiwai@suse.de>2024-04-26 17:07:01 +0200
commit957a36c4fcf47aaa4f0d54bdb8050d86880b7f01 (patch)
tree7926595fe615bf86cfe8383ded6e53011ad9b0f0 /sound/core
parent541b8a266e0ebf7b4f91f753783a2d2b972169ea (diff)
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>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/sound_kunit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/sound_kunit.c b/sound/core/sound_kunit.c
index eb90f62228c0..e34c4317f5eb 100644
--- a/sound/core/sound_kunit.c
+++ b/sound/core/sound_kunit.c
@@ -167,7 +167,7 @@ static void _test_fill_silence(struct kunit *test, struct snd_format_test_data *
static void test_format_fill_silence(struct kunit *test)
{
- u32 buf_samples[] = { 10, 20, 32, 64, 129, SILENCE_BUFFER_MAX_FRAMES };
+ static const u32 buf_samples[] = { 10, 20, 32, 64, 129, SILENCE_BUFFER_MAX_FRAMES };
u8 *buffer;
u32 i, j;