Re: [PATCH] ASoC: rt1320-sdw: kcontrol for brown-out feature switch

kernel test robot
2026-04-07T03:50:21Z

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on linus/master v7.0-rc6 next-20260402]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/jack-yu-realtek-com/ASoC-rt1320-sdw-kcontrol-for-brown-out-feature-switch/20260403-160437
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20260401093107.632673-1-jack.yu%40realtek.com
patch subject: [PATCH] ASoC: rt1320-sdw: kcontrol for brown-out feature switch
config: arc-randconfig-001-20260403 (https://download.01.org/0day-ci/archive/20260403/202604032240.PeKldNcG-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260403/202604032240.PeKldNcG-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604032240.PeKldNcG-lkp@intel.com/

All warnings (new ones prefixed by >>):

sound/soc/codecs/rt1320-sdw.c: In function 'rt1320_brown_out_put':
>> sound/soc/codecs/rt1320-sdw.c:2504:11: warning: unused variable 'tmp' [-Wunused-variable]
int ret, tmp;
^~~
>> sound/soc/codecs/rt1320-sdw.c:2503:17: warning: unused variable 'dev' [-Wunused-variable]
struct device *dev = &rt1320->sdw_slave->dev;
^~~

vim +/tmp +2504 sound/soc/codecs/rt1320-sdw.c

2497
2498 static int rt1320_brown_out_put(struct snd_kcontrol *kcontrol,
2499 struct snd_ctl_elem_value *ucontrol)
2500 {
2501 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
2502 struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component);
> 2503 struct device *dev = &rt1320->sdw_slave->dev;
> 2504 int ret, tmp;
2505
2506 ret = pm_runtime_resume(component->dev);
2507 if (ret < 0 && ret != -EACCES)
2508 return ret;
2509
2510 rt1320->brown_out = ucontrol->value.integer.value[0];
2511 regcache_cache_bypass(rt1320->regmap, true);
2512
2513 if (rt1320->brown_out == 1)
2514 regmap_write(rt1320->regmap, 0xdb03, 0x00);
2515 else
2516 regmap_write(rt1320->regmap, 0xdb03, 0xf0);
2517
2518 regcache_cache_bypass(rt1320->regmap, false);
2519
2520 return 0;
2521 }
2522

--
0-DAY CI Kernel Test Service