Linux Sound subsystem development
 help / color / mirror / Atom feed
From: hariconscious@gmail.com
To: perex@perex.cz, tiwai@suse.com
Cc: khalid@kernel.org, shuah@kernel.org,
	david.hunter.linux@gmail.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	HariKrishna Sagala <hariconscious@gmail.com>
Subject: [PATCH v2] ALSA: rawmidi: Fix inconsistent indenting warning reported by smatch
Date: Mon,  1 Dec 2025 20:41:40 +0530	[thread overview]
Message-ID: <20251201151137.29536-4-hariconscious@gmail.com> (raw)

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


             reply	other threads:[~2025-12-01 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-01 15:11 hariconscious [this message]
2025-12-01 15:27 ` [PATCH v2] ALSA: rawmidi: Fix inconsistent indenting warning reported by smatch 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=20251201151137.29536-4-hariconscious@gmail.com \
    --to=hariconscious@gmail.com \
    --cc=david.hunter.linux@gmail.com \
    --cc=khalid@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=shuah@kernel.org \
    --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