mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 12:34:02 +02:00
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>
This commit is contained in:
parent
4392569d95
commit
4797f26715
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user