[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109161126.0bE3sqea-lkp@intel.com>
Date: Thu, 16 Sep 2021 11:34:33 +0800
From: kernel test robot <lkp@...el.com>
To: Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nel.org>
Subject: [broonie-sound:for-5.16 27/45] sound/soc/codecs/cs35l41.c:582:14:
warning: variable 'pdn' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.16
head: bde4f08cff47632f0a52e15a613365e26608d003
commit: c2f14cc2bcdd532f8a18450407ffc27bbbff2319 [27/45] ASoC: cs35l41: Fix use of an uninitialised variable
config: xtensa-randconfig-r021-20210916 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?id=c2f14cc2bcdd532f8a18450407ffc27bbbff2319
git remote add broonie-sound https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
git fetch --no-tags broonie-sound for-5.16
git checkout c2f14cc2bcdd532f8a18450407ffc27bbbff2319
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
sound/soc/codecs/cs35l41.c: In function 'cs35l41_main_amp_event':
>> sound/soc/codecs/cs35l41.c:582:14: warning: variable 'pdn' set but not used [-Wunused-but-set-variable]
582 | bool pdn;
| ^~~
vim +/pdn +582 sound/soc/codecs/cs35l41.c
6450ef55905688 David Rhodes 2021-09-07 572
6450ef55905688 David Rhodes 2021-09-07 573 static int cs35l41_main_amp_event(struct snd_soc_dapm_widget *w,
6450ef55905688 David Rhodes 2021-09-07 574 struct snd_kcontrol *kcontrol, int event)
6450ef55905688 David Rhodes 2021-09-07 575 {
6450ef55905688 David Rhodes 2021-09-07 576 struct snd_soc_component *component =
6450ef55905688 David Rhodes 2021-09-07 577 snd_soc_dapm_to_component(w->dapm);
6450ef55905688 David Rhodes 2021-09-07 578 struct cs35l41_private *cs35l41 =
6450ef55905688 David Rhodes 2021-09-07 579 snd_soc_component_get_drvdata(component);
6450ef55905688 David Rhodes 2021-09-07 580 unsigned int val;
6450ef55905688 David Rhodes 2021-09-07 581 int ret = 0;
6450ef55905688 David Rhodes 2021-09-07 @582 bool pdn;
6450ef55905688 David Rhodes 2021-09-07 583
6450ef55905688 David Rhodes 2021-09-07 584 switch (event) {
6450ef55905688 David Rhodes 2021-09-07 585 case SND_SOC_DAPM_POST_PMU:
6450ef55905688 David Rhodes 2021-09-07 586 regmap_multi_reg_write_bypassed(cs35l41->regmap,
6450ef55905688 David Rhodes 2021-09-07 587 cs35l41_pup_patch,
6450ef55905688 David Rhodes 2021-09-07 588 ARRAY_SIZE(cs35l41_pup_patch));
6450ef55905688 David Rhodes 2021-09-07 589
6450ef55905688 David Rhodes 2021-09-07 590 regmap_update_bits(cs35l41->regmap, CS35L41_PWR_CTRL1,
6450ef55905688 David Rhodes 2021-09-07 591 CS35L41_GLOBAL_EN_MASK,
6450ef55905688 David Rhodes 2021-09-07 592 1 << CS35L41_GLOBAL_EN_SHIFT);
6450ef55905688 David Rhodes 2021-09-07 593
6450ef55905688 David Rhodes 2021-09-07 594 usleep_range(1000, 1100);
6450ef55905688 David Rhodes 2021-09-07 595 break;
6450ef55905688 David Rhodes 2021-09-07 596 case SND_SOC_DAPM_POST_PMD:
6450ef55905688 David Rhodes 2021-09-07 597 regmap_update_bits(cs35l41->regmap, CS35L41_PWR_CTRL1,
6450ef55905688 David Rhodes 2021-09-07 598 CS35L41_GLOBAL_EN_MASK, 0);
6450ef55905688 David Rhodes 2021-09-07 599
6450ef55905688 David Rhodes 2021-09-07 600 pdn = false;
c2f14cc2bcdd53 Charles Keepax 2021-09-14 601 ret = regmap_read_poll_timeout(cs35l41->regmap, CS35L41_IRQ1_STATUS1,
c2f14cc2bcdd53 Charles Keepax 2021-09-14 602 val, val & CS35L41_PDN_DONE_MASK,
c2f14cc2bcdd53 Charles Keepax 2021-09-14 603 1000, 100000);
c2f14cc2bcdd53 Charles Keepax 2021-09-14 604 if (ret)
c2f14cc2bcdd53 Charles Keepax 2021-09-14 605 dev_warn(cs35l41->dev, "PDN failed: %d\n", ret);
6450ef55905688 David Rhodes 2021-09-07 606
6450ef55905688 David Rhodes 2021-09-07 607 regmap_write(cs35l41->regmap, CS35L41_IRQ1_STATUS1,
6450ef55905688 David Rhodes 2021-09-07 608 CS35L41_PDN_DONE_MASK);
6450ef55905688 David Rhodes 2021-09-07 609
6450ef55905688 David Rhodes 2021-09-07 610 regmap_multi_reg_write_bypassed(cs35l41->regmap,
6450ef55905688 David Rhodes 2021-09-07 611 cs35l41_pdn_patch,
6450ef55905688 David Rhodes 2021-09-07 612 ARRAY_SIZE(cs35l41_pdn_patch));
6450ef55905688 David Rhodes 2021-09-07 613 break;
6450ef55905688 David Rhodes 2021-09-07 614 default:
6450ef55905688 David Rhodes 2021-09-07 615 dev_err(cs35l41->dev, "Invalid event = 0x%x\n", event);
6450ef55905688 David Rhodes 2021-09-07 616 ret = -EINVAL;
6450ef55905688 David Rhodes 2021-09-07 617 }
6450ef55905688 David Rhodes 2021-09-07 618 return ret;
6450ef55905688 David Rhodes 2021-09-07 619 }
6450ef55905688 David Rhodes 2021-09-07 620
:::::: The code at line 582 was first introduced by commit
:::::: 6450ef55905688602175fae4ed1bfbfef6a14dde ASoC: cs35l41: CS35L41 Boosted Smart Amplifier
:::::: TO: David Rhodes <drhodes@...nsource.cirrus.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" (39580 bytes)
Powered by blists - more mailing lists