ALSA: core: use ARRAY_SIZE() in snd_minor_info_read()
PATCH 1/1 ALSA: core: use ARRAY_SIZE() in snd_minor_info_read()
From: bui duc phuc <[email protected]>
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 <[email protected]>
--- sound/core/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/sound.c +1 -1
@@ -358,7 +358,7 @@ static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_bustruct 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 ;
Signature · 1 line
2.43.0
Takashi Iwai
AppliedQuoted 8 lines · On Tue, 07 Jul 2026 09:45:56 +0200, [email protected] wrote:
From: bui duc phuc <[email protected]>
Use
ARRAY_SIZE(snd_minors)instead ofSNDRV_OS_MINORSdirectly, for consistency withsnd_find_free_minor()andsnd_unregister_device()in the same file. No functional change.Signed-off-by bui duc phuc <[email protected]>
Applied to for-next branch now. Thanks.
Takashi