All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: sound/sparc/dbri.c:1842:1-3: WARNING: possible condition with no effect (if == else)
Date: Fri, 31 Jul 2026 08:48:11 +0800	[thread overview]
Message-ID: <202607310803.DWbaniIT-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Takashi Iwai <tiwai@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   11028ab62899e4191e074ee364c712b77823a9c4
commit: 3c30d57544bf91d6adaf3cab8474194e4c4404bc ALSA: sparc/dbri: Use guard() for spin locks
date:   11 months ago
:::::: branch date: 25 hours ago
:::::: commit date: 11 months ago
config: sparc-randconfig-r063-20260731 (https://download.01.org/0day-ci/archive/20260731/202607310803.DWbaniIT-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 15.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 3c30d57544bf ("ALSA: sparc/dbri: Use guard() for spin locks")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202607310803.DWbaniIT-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> sound/sparc/dbri.c:1842:1-3: WARNING: possible condition with no effect (if == else)

vim +1842 sound/sparc/dbri.c

1bd9debf25b8a5 Takashi Iwai   2005-06-30  1841  
1bd9debf25b8a5 Takashi Iwai   2005-06-30 @1842  	if (channel == D_INTR_CMD) {
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1843  		dprintk(D_CMD, "INTR: Command: %-5s  Value:%d\n",
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1844  			cmds[command], val);
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1845  	} else {
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1846  		dprintk(D_INT, "INTR: Chan:%d Code:%d Val:%#x\n",
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1847  			channel, code, rval);
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1848  	}
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1849  
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1850  	switch (code) {
1be54c824be9b5 Krzysztof Helt 2006-08-21  1851  	case D_INTR_CMDI:
1be54c824be9b5 Krzysztof Helt 2006-08-21  1852  		if (command != D_WAIT)
1be54c824be9b5 Krzysztof Helt 2006-08-21  1853  			printk(KERN_ERR "DBRI: Command read interrupt\n");
1be54c824be9b5 Krzysztof Helt 2006-08-21  1854  		break;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1855  	case D_INTR_BRDY:
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1856  		reception_complete_intr(dbri, channel);
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1857  		break;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1858  	case D_INTR_XCMP:
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1859  	case D_INTR_MINT:
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1860  		transmission_complete_intr(dbri, channel);
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1861  		break;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1862  	case D_INTR_UNDR:
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1863  		/* UNDR - Transmission underrun
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1864  		 * resend SDP command with clear pipe bit (C) set
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1865  		 */
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1866  		{
1be54c824be9b5 Krzysztof Helt 2006-08-21  1867  	/* FIXME: do something useful in case of underrun */
1be54c824be9b5 Krzysztof Helt 2006-08-21  1868  			printk(KERN_ERR "DBRI: Underrun error\n");
1be54c824be9b5 Krzysztof Helt 2006-08-21  1869  #if 0
1be54c824be9b5 Krzysztof Helt 2006-08-21  1870  			s32 *cmd;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1871  			int pipe = channel;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1872  			int td = dbri->pipes[pipe].desc;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1873  
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1874  			dbri->dma->desc[td].word4 = 0;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1875  			cmd = dbri_cmdlock(dbri, NoGetLock);
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1876  			*(cmd++) = DBRI_CMD(D_SDP, 0,
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1877  					    dbri->pipes[pipe].sdp
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1878  					    | D_SDP_P | D_SDP_C | D_SDP_2SAME);
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1879  			*(cmd++) = dbri->dma_dvma + dbri_dma_off(desc, td);
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1880  			dbri_cmdsend(dbri, cmd);
1be54c824be9b5 Krzysztof Helt 2006-08-21  1881  #endif
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1882  		}
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1883  		break;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1884  	case D_INTR_FXDT:
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1885  		/* FXDT - Fixed data change */
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1886  		if (dbri->pipes[channel].sdp & D_SDP_MSB)
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1887  			val = reverse_bytes(val, dbri->pipes[channel].length);
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1888  
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1889  		if (dbri->pipes[channel].recv_fixed_ptr)
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1890  			*(dbri->pipes[channel].recv_fixed_ptr) = val;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1891  		break;
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1892  	default:
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1893  		if (channel != D_INTR_CMD)
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1894  			printk(KERN_WARNING
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1895  			       "DBRI: Ignored Interrupt: %d (0x%x)\n", code, x);
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1896  	}
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1897  }
1bd9debf25b8a5 Takashi Iwai   2005-06-30  1898  

:::::: The code at line 1842 was first introduced by commit
:::::: 1bd9debf25b8a5f5029d7619f43e4a9a775973d3 [ALSA] Add DBRI driver on Sparcs

:::::: TO: Takashi Iwai <tiwai@suse.de>
:::::: CC: Jaroslav Kysela <perex@suse.cz>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-07-31  0:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202607310803.DWbaniIT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.