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, Dan Carpenter <error27@gmail.com>
Subject: sound/pci/rme96.c:1011 snd_rme96_playback_hw_params() warn: inconsistent returns '&rme96->lock'.
Date: Tue, 24 Mar 2026 22:54:13 +0800	[thread overview]
Message-ID: <202603242252.uEpptmA1-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:   c369299895a591d96745d6492d4888259b004a9e
commit: d3424b8bf78593e1751cfa19628aa0008d2e08ce ALSA: rme96: Use guard() for spin locks
date:   7 months ago
:::::: branch date: 2 days ago
:::::: commit date: 7 months ago
config: powerpc64-randconfig-r072-20260324 (https://download.01.org/0day-ci/archive/20260324/202603242252.uEpptmA1-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 10.5.0
smatch: v0.5.0-9004-gb810ac53

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
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202603242252.uEpptmA1-lkp@intel.com/

smatch warnings:
sound/pci/rme96.c:1011 snd_rme96_playback_hw_params() warn: inconsistent returns '&rme96->lock'.
sound/pci/rme96.c:1011 snd_rme96_playback_hw_params() warn: inconsistent returns 'irq'.

vim +1011 sound/pci/rme96.c

^1da177e4c3f415 Linus Torvalds  2005-04-16   952  
^1da177e4c3f415 Linus Torvalds  2005-04-16   953  static int
a3aefd883dc8c17 Takashi Iwai    2005-11-17   954  snd_rme96_playback_hw_params(struct snd_pcm_substream *substream,
a3aefd883dc8c17 Takashi Iwai    2005-11-17   955  			     struct snd_pcm_hw_params *params)
^1da177e4c3f415 Linus Torvalds  2005-04-16   956  {
a3aefd883dc8c17 Takashi Iwai    2005-11-17   957  	struct rme96 *rme96 = snd_pcm_substream_chip(substream);
a3aefd883dc8c17 Takashi Iwai    2005-11-17   958  	struct snd_pcm_runtime *runtime = substream->runtime;
^1da177e4c3f415 Linus Torvalds  2005-04-16   959  	int err, rate, dummy;
a74a821624c0c75 Takashi Iwai    2015-12-04   960  	bool apply_dac_volume = false;
^1da177e4c3f415 Linus Torvalds  2005-04-16   961  
4d23359b7ec8b03 Clemens Ladisch 2005-09-05   962  	runtime->dma_area = (void __force *)(rme96->iobase +
4d23359b7ec8b03 Clemens Ladisch 2005-09-05   963  					     RME96_IO_PLAY_BUFFER);
^1da177e4c3f415 Linus Torvalds  2005-04-16   964  	runtime->dma_addr = rme96->port + RME96_IO_PLAY_BUFFER;
^1da177e4c3f415 Linus Torvalds  2005-04-16   965  	runtime->dma_bytes = RME96_BUFFER_SIZE;
^1da177e4c3f415 Linus Torvalds  2005-04-16   966  
d3424b8bf78593e Takashi Iwai    2025-08-29   967  	scoped_guard(spinlock_irq, &rme96->lock) {
da8eedb169712c8 Takashi Iwai    2021-06-08   968  		rate = 0;
^1da177e4c3f415 Linus Torvalds  2005-04-16   969  		if (!(rme96->wcreg & RME96_WCR_MASTER) &&
da8eedb169712c8 Takashi Iwai    2021-06-08   970  		    snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG)
da8eedb169712c8 Takashi Iwai    2021-06-08   971  			rate = snd_rme96_capture_getrate(rme96, &dummy);
da8eedb169712c8 Takashi Iwai    2021-06-08   972  		if (rate > 0) {
^1da177e4c3f415 Linus Torvalds  2005-04-16   973  			/* slave clock */
d3424b8bf78593e Takashi Iwai    2025-08-29   974  			if ((int)params_rate(params) != rate)
d3424b8bf78593e Takashi Iwai    2025-08-29   975  				return -EIO;
a74a821624c0c75 Takashi Iwai    2015-12-04   976  		} else {
a74a821624c0c75 Takashi Iwai    2015-12-04   977  			err = snd_rme96_playback_setrate(rme96, params_rate(params));
a74a821624c0c75 Takashi Iwai    2015-12-04   978  			if (err < 0)
d3424b8bf78593e Takashi Iwai    2025-08-29   979  				return err;
a74a821624c0c75 Takashi Iwai    2015-12-04   980  			apply_dac_volume = err > 0; /* need to restore volume later? */
^1da177e4c3f415 Linus Torvalds  2005-04-16   981  		}
a74a821624c0c75 Takashi Iwai    2015-12-04   982  
a74a821624c0c75 Takashi Iwai    2015-12-04   983  		err = snd_rme96_playback_setformat(rme96, params_format(params));
a74a821624c0c75 Takashi Iwai    2015-12-04   984  		if (err < 0)
a74a821624c0c75 Takashi Iwai    2015-12-04   985  			goto error;
^1da177e4c3f415 Linus Torvalds  2005-04-16   986  		snd_rme96_setframelog(rme96, params_channels(params), 1);
^1da177e4c3f415 Linus Torvalds  2005-04-16   987  		if (rme96->capture_periodsize != 0) {
^1da177e4c3f415 Linus Torvalds  2005-04-16   988  			if (params_period_size(params) << rme96->playback_frlog !=
d3424b8bf78593e Takashi Iwai    2025-08-29   989  			    rme96->capture_periodsize) {
a74a821624c0c75 Takashi Iwai    2015-12-04   990  				err = -EBUSY;
a74a821624c0c75 Takashi Iwai    2015-12-04   991  				goto error;
^1da177e4c3f415 Linus Torvalds  2005-04-16   992  			}
^1da177e4c3f415 Linus Torvalds  2005-04-16   993  		}
^1da177e4c3f415 Linus Torvalds  2005-04-16   994  		rme96->playback_periodsize =
^1da177e4c3f415 Linus Torvalds  2005-04-16   995  			params_period_size(params) << rme96->playback_frlog;
^1da177e4c3f415 Linus Torvalds  2005-04-16   996  		snd_rme96_set_period_properties(rme96, rme96->playback_periodsize);
^1da177e4c3f415 Linus Torvalds  2005-04-16   997  		/* S/PDIF setup */
^1da177e4c3f415 Linus Torvalds  2005-04-16   998  		if ((rme96->wcreg & RME96_WCR_ADAT) == 0) {
^1da177e4c3f415 Linus Torvalds  2005-04-16   999  			rme96->wcreg &= ~(RME96_WCR_PRO | RME96_WCR_DOLBY | RME96_WCR_EMP);
^1da177e4c3f415 Linus Torvalds  2005-04-16  1000  			writel(rme96->wcreg |= rme96->wcreg_spdif_stream, rme96->iobase + RME96_IO_CONTROL_REGISTER);
^1da177e4c3f415 Linus Torvalds  2005-04-16  1001  		}
a74a821624c0c75 Takashi Iwai    2015-12-04  1002  
a74a821624c0c75 Takashi Iwai    2015-12-04  1003  		err = 0;
d3424b8bf78593e Takashi Iwai    2025-08-29  1004  	}
a74a821624c0c75 Takashi Iwai    2015-12-04  1005   error:
a74a821624c0c75 Takashi Iwai    2015-12-04  1006  	if (apply_dac_volume) {
a74a821624c0c75 Takashi Iwai    2015-12-04  1007  		usleep_range(3000, 10000);
a74a821624c0c75 Takashi Iwai    2015-12-04  1008  		snd_rme96_apply_dac_volume(rme96);
a74a821624c0c75 Takashi Iwai    2015-12-04  1009  	}
^1da177e4c3f415 Linus Torvalds  2005-04-16  1010  
a74a821624c0c75 Takashi Iwai    2015-12-04 @1011  	return err;
^1da177e4c3f415 Linus Torvalds  2005-04-16  1012  }
^1da177e4c3f415 Linus Torvalds  2005-04-16  1013  

:::::: The code at line 1011 was first introduced by commit
:::::: a74a821624c0c75388a193337babd17a8c02c740 ALSA: rme96: Fix unexpected volume reset after rate changes

:::::: TO: Takashi Iwai <tiwai@suse.de>
:::::: CC: Takashi Iwai <tiwai@suse.de>

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

             reply	other threads:[~2026-03-24 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 14:54 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-09 12:14 sound/pci/rme96.c:1011 snd_rme96_playback_hw_params() warn: inconsistent returns '&rme96->lock' kernel test robot
2025-12-12 15:27 kernel test robot

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=202603242252.uEpptmA1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --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.