lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202108231809.NOi9qOEj-lkp@intel.com>
Date:   Mon, 23 Aug 2021 18:39:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Tzung-Bi Shih <tzungbi@...gle.com>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>
Subject: sound/soc/codecs/rt1015.c:724:2: warning: Value stored to 'bclk_ms'
 is never read [clang-analyzer-deadcode.DeadStores]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e22ce8eb631bdc47a4a4ea7ecf4e4ba499db4f93
commit: a5db2ca51367eeafb0c4013d3a6fc58932612c03 ASoC: rt1015: remove unneeded variables in rt1015_priv
date:   8 months ago
config: arm-randconfig-c002-20210820 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5db2ca51367eeafb0c4013d3a6fc58932612c03
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout a5db2ca51367eeafb0c4013d3a6fc58932612c03
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


clang-analyzer warnings: (new ones prefixed by >>)
                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   drivers/mtd/nand/raw/marvell_nand.c:2775:26: warning: Value stored to 'pdev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct platform_device *pdev = container_of(nfc->dev,
                                   ^~~~
   drivers/mtd/nand/raw/marvell_nand.c:2775:26: note: Value stored to 'pdev' during its initialization is never read
           struct platform_device *pdev = container_of(nfc->dev,
                                   ^~~~
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   sound/soc/codecs/wm8731.c:106:3: warning: Value stored to 'best' is never read [clang-analyzer-deadcode.DeadStores]
                   best = 0;
                   ^      ~
   sound/soc/codecs/wm8731.c:106:3: note: Value stored to 'best' is never read
                   best = 0;
                   ^      ~
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
>> sound/soc/codecs/rt1015.c:724:2: warning: Value stored to 'bclk_ms' is never read [clang-analyzer-deadcode.DeadStores]
           bclk_ms = frame_size > 32;
           ^         ~~~~~~~~~~~~~~~
   sound/soc/codecs/rt1015.c:724:2: note: Value stored to 'bclk_ms' is never read
           bclk_ms = frame_size > 32;
           ^         ~~~~~~~~~~~~~~~
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   4 warnings generated.
   sound/soc/codecs/tas2770.c:50:23: warning: Value stored to 'tas2770' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct tas2770_priv *tas2770 =
                                ^~~~~~~
   sound/soc/codecs/tas2770.c:50:23: note: Value stored to 'tas2770' during its initialization is never read
           struct tas2770_priv *tas2770 =
                                ^~~~~~~
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   2 warnings generated.
   Suppressed 2 warnings (2 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   3 warnings generated.
   Suppressed 3 warnings (3 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

vim +/bclk_ms +724 sound/soc/codecs/rt1015.c

df31007400c390 Jack Yu       2020-01-15  701  
df31007400c390 Jack Yu       2020-01-15  702  static int rt1015_hw_params(struct snd_pcm_substream *substream,
df31007400c390 Jack Yu       2020-01-15  703  	struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
df31007400c390 Jack Yu       2020-01-15  704  {
df31007400c390 Jack Yu       2020-01-15  705  	struct snd_soc_component *component = dai->component;
df31007400c390 Jack Yu       2020-01-15  706  	struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component);
a5db2ca51367ee Tzung-Bi Shih 2020-12-24  707  	int pre_div, bclk_ms, frame_size, lrck;
df31007400c390 Jack Yu       2020-01-15  708  	unsigned int val_len = 0;
df31007400c390 Jack Yu       2020-01-15  709  
a5db2ca51367ee Tzung-Bi Shih 2020-12-24  710  	lrck = params_rate(params);
a5db2ca51367ee Tzung-Bi Shih 2020-12-24  711  	pre_div = rl6231_get_clk_info(rt1015->sysclk, lrck);
df31007400c390 Jack Yu       2020-01-15  712  	if (pre_div < 0) {
df31007400c390 Jack Yu       2020-01-15  713  		dev_err(component->dev, "Unsupported clock rate\n");
df31007400c390 Jack Yu       2020-01-15  714  		return -EINVAL;
df31007400c390 Jack Yu       2020-01-15  715  	}
df31007400c390 Jack Yu       2020-01-15  716  
df31007400c390 Jack Yu       2020-01-15  717  	frame_size = snd_soc_params_to_frame_size(params);
df31007400c390 Jack Yu       2020-01-15  718  	if (frame_size < 0) {
df31007400c390 Jack Yu       2020-01-15  719  		dev_err(component->dev, "Unsupported frame size: %d\n",
df31007400c390 Jack Yu       2020-01-15  720  			frame_size);
df31007400c390 Jack Yu       2020-01-15  721  		return -EINVAL;
df31007400c390 Jack Yu       2020-01-15  722  	}
df31007400c390 Jack Yu       2020-01-15  723  
df31007400c390 Jack Yu       2020-01-15 @724  	bclk_ms = frame_size > 32;
df31007400c390 Jack Yu       2020-01-15  725  
df31007400c390 Jack Yu       2020-01-15  726  	dev_dbg(component->dev, "bclk_ms is %d and pre_div is %d for iis %d\n",
df31007400c390 Jack Yu       2020-01-15  727  				bclk_ms, pre_div, dai->id);
df31007400c390 Jack Yu       2020-01-15  728  
df31007400c390 Jack Yu       2020-01-15  729  	dev_dbg(component->dev, "lrck is %dHz and pre_div is %d for iis %d\n",
a5db2ca51367ee Tzung-Bi Shih 2020-12-24  730  				lrck, pre_div, dai->id);
df31007400c390 Jack Yu       2020-01-15  731  
df31007400c390 Jack Yu       2020-01-15  732  	switch (params_width(params)) {
df31007400c390 Jack Yu       2020-01-15  733  	case 16:
df31007400c390 Jack Yu       2020-01-15  734  		break;
df31007400c390 Jack Yu       2020-01-15  735  	case 20:
df31007400c390 Jack Yu       2020-01-15  736  		val_len = RT1015_I2S_DL_20;
df31007400c390 Jack Yu       2020-01-15  737  		break;
df31007400c390 Jack Yu       2020-01-15  738  	case 24:
df31007400c390 Jack Yu       2020-01-15  739  		val_len = RT1015_I2S_DL_24;
df31007400c390 Jack Yu       2020-01-15  740  		break;
df31007400c390 Jack Yu       2020-01-15  741  	case 8:
df31007400c390 Jack Yu       2020-01-15  742  		val_len = RT1015_I2S_DL_8;
df31007400c390 Jack Yu       2020-01-15  743  		break;
df31007400c390 Jack Yu       2020-01-15  744  	default:
df31007400c390 Jack Yu       2020-01-15  745  		return -EINVAL;
df31007400c390 Jack Yu       2020-01-15  746  	}
df31007400c390 Jack Yu       2020-01-15  747  
df31007400c390 Jack Yu       2020-01-15  748  	snd_soc_component_update_bits(component, RT1015_TDM_MASTER,
df31007400c390 Jack Yu       2020-01-15  749  		RT1015_I2S_DL_MASK, val_len);
df31007400c390 Jack Yu       2020-01-15  750  	snd_soc_component_update_bits(component, RT1015_CLK2,
4b01618b624736 Jack Yu       2020-03-03  751  		RT1015_FS_PD_MASK, pre_div << RT1015_FS_PD_SFT);
df31007400c390 Jack Yu       2020-01-15  752  
df31007400c390 Jack Yu       2020-01-15  753  	return 0;
df31007400c390 Jack Yu       2020-01-15  754  }
df31007400c390 Jack Yu       2020-01-15  755  

:::::: The code at line 724 was first introduced by commit
:::::: df31007400c3905ec15b1065241baf3864decbfa ASoC: rt1015: add rt1015 amplifier driver

:::::: TO: Jack Yu <jack.yu@...ltek.com>
:::::: CC: Mark Brown <broonie@...nel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (32263 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ