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] ALSA: rawmidi: Fix inconsistent indenting warning reported by smatch
Date: Mon, 1 Dec 2025 20:16:21 +0530 [thread overview]
Message-ID: <20251201144620.18942-2-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.
sound/core/rawmidi.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 20d36a346cca..5d90341cc18f 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -2106,25 +2106,25 @@ 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++) {
- 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]);
- midi_map[i] = 0;
- }
- if (amidi_map[i] < 0 || amidi_map[i] >= SNDRV_RAWMIDI_DEVICES) {
- pr_err("ALSA: rawmidi: invalid amidi_map[%d] = %d\n",
- i, amidi_map[i]);
- amidi_map[i] = 1;
+ {
+ int i;
+ /* check device map table */
+ for (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]);
+ midi_map[i] = 0;
+ }
+ if (amidi_map[i] < 0 || amidi_map[i] >= SNDRV_RAWMIDI_DEVICES) {
+ pr_err("ALSA: rawmidi: invalid amidi_map[%d] = %d\n",
+ i, amidi_map[i]);
+ amidi_map[i] = 1;
+ }
}
}
- }
#endif /* CONFIG_SND_OSSEMUL */
return 0;
}
base-commit: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
--
2.43.0
next reply other threads:[~2025-12-01 14:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 14:46 hariconscious [this message]
2025-12-01 15:02 ` [PATCH] 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=20251201144620.18942-2-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