* [PATCH v2] ALSA: rawmidi: Fix inconsistent indenting warning reported by smatch
@ 2025-12-01 15:11 hariconscious
2025-12-01 15:27 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: hariconscious @ 2025-12-01 15:11 UTC (permalink / raw)
To: perex, tiwai
Cc: khalid, shuah, david.hunter.linux, linux-sound, linux-kernel,
HariKrishna Sagala
From: HariKrishna Sagala <hariconscious@gmail.com>
Fix smatch reported inconsistent indenting warning in rawmidi.
sound/core/rawmidi.c:2115 alsa_rawmidi_init() warn: inconsistent
indenting.
No functional changes were introduced.
Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com>
---
This patch fixes the below smatch reported warning
sound/core/rawmidi.c:2115 alsa_rawmidi_init() warn: inconsistent
indenting.
Re-ran the smatch to confirm warning is cleared and no functional
changes were introduced.
Thank you Takashi Iwai for quick feedback.
v2:
corrected review comments from Takashi Iwai.
v1:
https://lore.kernel.org/all/20251201144620.18942-2-hariconscious@gmail.com/
Thank you.
sound/core/rawmidi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 20d36a346cca..8969ee2757f1 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -2106,13 +2106,11 @@ EXPORT_SYMBOL(snd_rawmidi_set_ops);
static int __init alsa_rawmidi_init(void)
{
-
snd_ctl_register_ioctl(snd_rawmidi_control_ioctl);
snd_ctl_register_ioctl_compat(snd_rawmidi_control_ioctl);
#ifdef CONFIG_SND_OSSEMUL
- { int i;
/* check device map table */
- for (i = 0; i < SNDRV_CARDS; i++) {
+ for (int i = 0; i < SNDRV_CARDS; i++) {
if (midi_map[i] < 0 || midi_map[i] >= SNDRV_RAWMIDI_DEVICES) {
pr_err("ALSA: rawmidi: invalid midi_map[%d] = %d\n",
i, midi_map[i]);
@@ -2124,7 +2122,6 @@ static int __init alsa_rawmidi_init(void)
amidi_map[i] = 1;
}
}
- }
#endif /* CONFIG_SND_OSSEMUL */
return 0;
}
base-commit: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ALSA: rawmidi: Fix inconsistent indenting warning reported by smatch
2025-12-01 15:11 [PATCH v2] ALSA: rawmidi: Fix inconsistent indenting warning reported by smatch hariconscious
@ 2025-12-01 15:27 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-12-01 15:27 UTC (permalink / raw)
To: hariconscious
Cc: perex, tiwai, khalid, shuah, david.hunter.linux, linux-sound,
linux-kernel
On Mon, 01 Dec 2025 16:11:40 +0100,
hariconscious@gmail.com wrote:
>
> From: HariKrishna Sagala <hariconscious@gmail.com>
>
> Fix smatch reported inconsistent indenting warning in rawmidi.
> sound/core/rawmidi.c:2115 alsa_rawmidi_init() warn: inconsistent
> indenting.
> No functional changes were introduced.
>
> Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-01 15:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-01 15:11 [PATCH v2] ALSA: rawmidi: Fix inconsistent indenting warning reported by smatch hariconscious
2025-12-01 15:27 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox