The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ALSA: core: use ARRAY_SIZE() in snd_minor_info_read()
@ 2026-07-07  7:45 phucduc.bui
  2026-07-07 14:36 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-07-07  7:45 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: cassiogabrielcontato, Kees Cook, linux-sound, linux-kernel,
	bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Use ARRAY_SIZE(snd_minors) instead of SNDRV_OS_MINORS directly, for
consistency with snd_find_free_minor() and snd_unregister_device() in
the same file. No functional change.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/core/sound.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/sound.c b/sound/core/sound.c
index 3e1969a52b21..17c380d8d8be 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -358,7 +358,7 @@ static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_bu
 	struct snd_minor *mptr;
 
 	guard(mutex)(&sound_mutex);
-	for (minor = 0; minor < SNDRV_OS_MINORS; ++minor) {
+	for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) {
 		mptr = snd_minors[minor];
 		if (!mptr)
 			continue;
-- 
2.43.0


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

end of thread, other threads:[~2026-07-07 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07  7:45 [PATCH] ALSA: core: use ARRAY_SIZE() in snd_minor_info_read() phucduc.bui
2026-07-07 14:36 ` Takashi Iwai

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