From: phucduc.bui@gmail.com
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: cassiogabrielcontato@gmail.com, Kees Cook <kees@kernel.org>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH] ALSA: core: use ARRAY_SIZE() in snd_minor_info_read()
Date: Tue, 7 Jul 2026 14:45:56 +0700 [thread overview]
Message-ID: <20260707074556.569451-1-phucduc.bui@gmail.com> (raw)
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
next reply other threads:[~2026-07-07 7:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 7:45 phucduc.bui [this message]
2026-07-07 14:36 ` [PATCH] ALSA: core: use ARRAY_SIZE() in snd_minor_info_read() Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260707074556.569451-1-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=cassiogabrielcontato@gmail.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox