mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] ALSA: aloop: make read-only array texts static const
@ 2026-07-14 16:33 Colin Ian King
  2026-07-15  7:48 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2026-07-14 16:33 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, linux-sound; +Cc: kernel-janitors, linux-kernel

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

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 sound/drivers/aloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index 236f49a7fb8b..7ebe8e5c9303 100644
--- a/sound/drivers/aloop.c
+++ b/sound/drivers/aloop.c
@@ -1668,7 +1668,7 @@ static int loopback_channels_get(struct snd_kcontrol *kcontrol,
 static int loopback_access_info(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_info *uinfo)
 {
-	const char * const texts[] = {"Interleaved", "Non-interleaved"};
+	static const char * const texts[] = {"Interleaved", "Non-interleaved"};
 
 	return snd_ctl_enum_info(uinfo, 1, ARRAY_SIZE(texts), texts);
 }
-- 
2.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][next] ALSA: aloop: make read-only array texts static const
  2026-07-14 16:33 [PATCH][next] ALSA: aloop: make read-only array texts static const Colin Ian King
@ 2026-07-15  7:48 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-07-15  7:48 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Jaroslav Kysela, Takashi Iwai, linux-sound, kernel-janitors,
	linux-kernel

On Tue, 14 Jul 2026 18:33:16 +0200,
Colin Ian King wrote:
> 
> Don't populate the read-only const array texts on the stack at run time,
> instead make it static.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Applied now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-15  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-14 16:33 [PATCH][next] ALSA: aloop: make read-only array texts static const Colin Ian King
2026-07-15  7:48 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox