From: wangdich9700@163.com
To: tiwai@suse.de, wangdich9700@163.com, broonie@kernel.org
Cc: wangdicheng@kylinos.cn, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] ALSA: sparc/dbri: Fix "possible condition with no effect" warning
Date: Fri, 17 Jul 2026 15:02:50 +0800 [thread overview]
Message-ID: <20260717070252.525545-3-wangdich9700@163.com> (raw)
In-Reply-To: <20260717070252.525545-1-wangdich9700@163.com>
From: wangdicheng <wangdicheng@kylinos.cn>
Fix a compiler warning about a condition with no effect:
sound/sparc/dbri.c:1843:1-3: WARNING: possible condition with no effect (if == else)
When DBRI_DEBUG is not defined, dprintk expands to an empty do-while
statement, making both branches of the if-else no-ops. Guard the entire
debug block with #ifdef DBRI_DEBUG to eliminate the warning and keep
the rval reference consistent with its declaration scope.
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
---
sound/sparc/dbri.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 2f5f62079fa4..ccaa36525f8d 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -1840,6 +1840,7 @@ static void dbri_process_one_interrupt(struct snd_dbri *dbri, int x)
int rval = D_INTR_GETRVAL(x);
#endif
+#ifdef DBRI_DEBUG
if (channel == D_INTR_CMD) {
dprintk(D_CMD, "INTR: Command: %-5s Value:%d\n",
cmds[command], val);
@@ -1847,6 +1848,7 @@ static void dbri_process_one_interrupt(struct snd_dbri *dbri, int x)
dprintk(D_INT, "INTR: Chan:%d Code:%d Val:%#x\n",
channel, code, rval);
}
+#endif
switch (code) {
case D_INTR_CMDI:
--
2.25.1
next prev parent reply other threads:[~2026-07-17 7:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 7:02 [PATCH 0/4] ALSA: Fix compiler warnings in sound subsystem wangdich9700
2026-07-17 7:02 ` [PATCH 1/4] ASoC: mediatek: mt8189: Remove redundant else-if branch with identical body wangdich9700
2026-07-17 7:02 ` wangdich9700 [this message]
2026-07-17 7:02 ` [PATCH 3/4] ASoC: fsl_easrc: Use div64_u64 for 64-by-64 division wangdich9700
2026-07-17 8:04 ` David Laight
2026-07-17 7:02 ` [PATCH 4/4] ASoC: tlv320aic32x4: Use div64_ul for division by unsigned long wangdich9700
2026-07-17 8:06 ` David Laight
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=20260717070252.525545-3-wangdich9700@163.com \
--to=wangdich9700@163.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=wangdicheng@kylinos.cn \
/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
all inboxes | Powered by JetHome®