[linux-next:master 4752/5667] sound/soc/codecs/tas2562.c:442:13: warning: variable 'ret' set but not used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   840126e36e8ff272cb63158646433fa1324533d9
commit: 2848d34c3ba1fc6f1ece0736a4faa16c6277f4d3 [4752/5667] ASoC: tas2562: Fix mute/unmute
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220907/202209070508.SsWVrSl0-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 12.1.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/next/linux-next.git/commit/?id=2848d34c3ba1fc6f1ece0736a4faa16c6277f4d3
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 2848d34c3ba1fc6f1ece0736a4faa16c6277f4d3
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash sound/soc/codecs/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   sound/soc/codecs/tas2562.c: In function 'tas2562_dac_event':
>> sound/soc/codecs/tas2562.c:442:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     442 |         int ret;
         |             ^~~


vim +/ret +442 sound/soc/codecs/tas2562.c

c173dba44c2d2e Dan Murphy     2019-10-08  429  
c173dba44c2d2e Dan Murphy     2019-10-08  430  static SOC_ENUM_SINGLE_DECL(tas2562_ASI1_src_enum, TAS2562_TDM_CFG2, 4,
c173dba44c2d2e Dan Murphy     2019-10-08  431  			    tas2562_ASI1_src);
c173dba44c2d2e Dan Murphy     2019-10-08  432  
c173dba44c2d2e Dan Murphy     2019-10-08  433  static const struct snd_kcontrol_new tas2562_asi1_mux =
c173dba44c2d2e Dan Murphy     2019-10-08  434  	SOC_DAPM_ENUM("ASI1 Source", tas2562_ASI1_src_enum);
c173dba44c2d2e Dan Murphy     2019-10-08  435  
c173dba44c2d2e Dan Murphy     2019-10-08  436  static int tas2562_dac_event(struct snd_soc_dapm_widget *w,
c173dba44c2d2e Dan Murphy     2019-10-08  437  			     struct snd_kcontrol *kcontrol, int event)
c173dba44c2d2e Dan Murphy     2019-10-08  438  {
c173dba44c2d2e Dan Murphy     2019-10-08  439  	struct snd_soc_component *component =
c173dba44c2d2e Dan Murphy     2019-10-08  440  					snd_soc_dapm_to_component(w->dapm);
c173dba44c2d2e Dan Murphy     2019-10-08  441  	struct tas2562_data *tas2562 = snd_soc_component_get_drvdata(component);
69e53129d01317 Dan Murphy     2020-02-19 @442  	int ret;
c173dba44c2d2e Dan Murphy     2019-10-08  443  
c173dba44c2d2e Dan Murphy     2019-10-08  444  	switch (event) {
c173dba44c2d2e Dan Murphy     2019-10-08  445  	case SND_SOC_DAPM_POST_PMU:
2848d34c3ba1fc Martin Povišer 2022-08-25  446  		tas2562->dac_powered = true;
2848d34c3ba1fc Martin Povišer 2022-08-25  447  		ret = tas2562_update_pwr_ctrl(tas2562);
c173dba44c2d2e Dan Murphy     2019-10-08  448  		break;
c173dba44c2d2e Dan Murphy     2019-10-08  449  	case SND_SOC_DAPM_PRE_PMD:
2848d34c3ba1fc Martin Povišer 2022-08-25  450  		tas2562->dac_powered = false;
2848d34c3ba1fc Martin Povišer 2022-08-25  451  		ret = tas2562_update_pwr_ctrl(tas2562);
c173dba44c2d2e Dan Murphy     2019-10-08  452  		break;
c173dba44c2d2e Dan Murphy     2019-10-08  453  	default:
69e53129d01317 Dan Murphy     2020-02-19  454  		dev_err(tas2562->dev, "Not supported evevt\n");
69e53129d01317 Dan Murphy     2020-02-19  455  		return -EINVAL;
c173dba44c2d2e Dan Murphy     2019-10-08  456  	}
c173dba44c2d2e Dan Murphy     2019-10-08  457  
c173dba44c2d2e Dan Murphy     2019-10-08  458  	return 0;
c173dba44c2d2e Dan Murphy     2019-10-08  459  }
c173dba44c2d2e Dan Murphy     2019-10-08  460  

:::::: The code at line 442 was first introduced by commit
:::::: 69e53129d01317d94e8b97ec11688880106a2f97 ASoC: tas2562: Add support for ISENSE and VSENSE

:::::: TO: Dan Murphy <dmurphy@xxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux