Re: [PATCH] ASoC: codecs: remove unneeded variable: "ret"

From: kernel test robot
Date: Wed Jul 07 2021 - 06:22:52 EST


Hi Gu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on asoc/for-next]
[also build test ERROR on sound/for-next linus/master next-20210707]
[cannot apply to linux/master v5.13]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Gu-Shengxian/ASoC-codecs-remove-unneeded-variable-ret/20210707-150028
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: ia64-randconfig-r014-20210707 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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://github.com/0day-ci/linux/commit/30a523dc3af43bae8d4764e6ba542058d038b1ec
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Gu-Shengxian/ASoC-codecs-remove-unneeded-variable-ret/20210707-150028
git checkout 30a523dc3af43bae8d4764e6ba542058d038b1ec
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash sound/soc/codecs/

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

All errors (new ones prefixed by >>):

In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from arch/ia64/include/asm/sections.h:11,
from include/linux/interrupt.h:20,
from arch/ia64/include/asm/hw_irq.h:10,
from include/linux/irq.h:589,
from include/linux/gpio/driver.h:7,
from include/linux/of_gpio.h:14,
from sound/soc/codecs/wcd938x.c:13:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
sound/soc/codecs/wcd938x.c: In function 'wcd938x_codec_enable_aux_pa':
>> sound/soc/codecs/wcd938x.c:1903:10: error: expected ';' before '}' token
1903 | return 0
| ^
| ;
1904 | }
| ~


vim +1903 sound/soc/codecs/wcd938x.c

1861
1862 static int wcd938x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
1863 struct snd_kcontrol *kcontrol, int event)
1864 {
1865 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1866 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1867 int hph_mode = wcd938x->hph_mode;
1868
1869 switch (event) {
1870 case SND_SOC_DAPM_PRE_PMU:
1871 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
1872 WCD938X_AUX_PDM_WD_EN_MASK, 1);
1873 break;
1874 case SND_SOC_DAPM_POST_PMU:
1875 /* 1 msec delay as per HW requirement */
1876 usleep_range(1000, 1010);
1877 if (hph_mode == CLS_AB || hph_mode == CLS_AB_HIFI ||
1878 hph_mode == CLS_AB_LP || hph_mode == CLS_AB_LOHIFI)
1879 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
1880 WCD938X_REGULATOR_MODE_MASK,
1881 WCD938X_REGULATOR_MODE_CLASS_AB);
1882 enable_irq(wcd938x->aux_pdm_wd_int);
1883 break;
1884 case SND_SOC_DAPM_PRE_PMD:
1885 disable_irq_nosync(wcd938x->aux_pdm_wd_int);
1886 break;
1887 case SND_SOC_DAPM_POST_PMD:
1888 /* 1 msec delay as per HW requirement */
1889 usleep_range(1000, 1010);
1890 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
1891 WCD938X_AUX_PDM_WD_EN_MASK, 0);
1892 wcd_clsh_ctrl_set_state(wcd938x->clsh_info,
1893 WCD_CLSH_EVENT_POST_PA,
1894 WCD_CLSH_STATE_AUX,
1895 hph_mode);
1896
1897 wcd938x->flyback_cur_det_disable--;
1898 if (wcd938x->flyback_cur_det_disable == 0)
1899 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
1900 WCD938X_EN_CUR_DET_MASK, 1);
1901 break;
1902 }
> 1903 return 0
1904 }
1905

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

Attachment: .config.gz
Description: application/gzip