diff options
| author | wangdicheng <wangdicheng@kylinos.cn> | 2026-07-17 17:15:41 +0800 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-07-19 10:42:22 +0200 |
| commit | 4797f267159029a6ac93f3d25c22eed3d07fda42 (patch) | |
| tree | b6c625a1f9095905f9585bfe100b7e8e7730a676 /sound | |
| parent | 4392569d95e6a794780fc33ce168744c67cb162e (diff) | |
| download | linux-next-4797f267159029a6ac93f3d25c22eed3d07fda42.tar.gz linux-next-4797f267159029a6ac93f3d25c22eed3d07fda42.zip | |
ALSA: sparc/dbri: Fix "possible condition with no effect" warning
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>
Link: https://patch.msgid.link/20260717091542.721877-3-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/sparc/dbri.c | 2 |
1 files changed, 2 insertions, 0 deletions
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: |
