Re: [PATCH 2/2] ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP
From: kernel test robot
Date: Wed Apr 09 2025 - 17:09:36 EST
Hi Richard,
kernel test robot noticed the following build warnings:
[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on tiwai-sound/for-next tiwai-sound/for-linus robh/for-next linus/master v6.15-rc1 next-20250409]
[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/Richard-Fitzgerald/ASoC-dt-bindings-Add-Cirrus-Logic-CS48L32-audio-DSP/20250409-002905
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20250408162310.670041-3-rf%40opensource.cirrus.com
patch subject: [PATCH 2/2] ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP
config: powerpc64-randconfig-003-20250410 (https://download.01.org/0day-ci/archive/20250410/202504100405.7znimLX7-lkp@xxxxxxxxx/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 92c93f5286b9ff33f27ff694d2dc33da1c07afdd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250410/202504100405.7znimLX7-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504100405.7znimLX7-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> sound/soc/codecs/cs48l32.c:3435:3: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
3435 | i + 1, ana_mode_l, ana_mode_r);
| ^
include/linux/dev_printk.h:165:39: note: expanded from macro 'dev_dbg'
165 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:274:19: note: expanded from macro 'dynamic_dev_dbg'
274 | dev, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:250:59: note: expanded from macro '_dynamic_func_call'
250 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:248:65: note: expanded from macro '_dynamic_func_call_cls'
248 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:224:15: note: expanded from macro '__dynamic_func_call_cls'
224 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
sound/soc/codecs/cs48l32.c:3408:7: note: initialize the variable 'i' to silence this warning
3408 | int i;
| ^
| = 0
1 warning generated.
vim +/i +3435 sound/soc/codecs/cs48l32.c
3402
3403 static int cs48l32_init_inputs(struct snd_soc_component *component)
3404 {
3405 struct cs48l32_codec *cs48l32_codec = snd_soc_component_get_drvdata(component);
3406 struct regmap *regmap = cs48l32_codec->core.regmap;
3407 unsigned int ana_mode_l, ana_mode_r, dig_mode;
3408 int i;
3409
3410 /*
3411 * Initialize input modes from the A settings. For muxed inputs the
3412 * B settings will be applied if the mux is changed
3413 */
3414 switch (cs48l32_codec->in_type[0][0]) {
3415 default:
3416 case CS48L32_IN_TYPE_DIFF:
3417 ana_mode_l = 0;
3418 break;
3419 case CS48L32_IN_TYPE_SE:
3420 ana_mode_l = 1 << CS48L32_INx_SRC_SHIFT;
3421 break;
3422 }
3423
3424 switch (cs48l32_codec->in_type[1][0]) {
3425 default:
3426 case CS48L32_IN_TYPE_DIFF:
3427 ana_mode_r = 0;
3428 break;
3429 case CS48L32_IN_TYPE_SE:
3430 ana_mode_r = 1 << CS48L32_INx_SRC_SHIFT;
3431 break;
3432 }
3433
3434 dev_dbg(cs48l32_codec->core.dev, "IN%d_1 Analogue mode=#%x,#%x\n",
> 3435 i + 1, ana_mode_l, ana_mode_r);
3436
3437 regmap_update_bits(regmap,
3438 CS48L32_IN1L_CONTROL1,
3439 CS48L32_INx_SRC_MASK,
3440 ana_mode_l);
3441
3442 regmap_update_bits(regmap,
3443 CS48L32_IN1R_CONTROL1,
3444 CS48L32_INx_SRC_MASK,
3445 ana_mode_r);
3446
3447 for (i = 0; i < ARRAY_SIZE(cs48l32_codec->pdm_sup); i++) {
3448 dig_mode = cs48l32_codec->pdm_sup[i] << CS48L32_IN1_PDM_SUP_SHIFT;
3449
3450 dev_dbg(cs48l32_codec->core.dev, "IN%d PDM_SUP=#%x\n", i + 1, dig_mode);
3451
3452 regmap_update_bits(regmap,
3453 CS48L32_INPUT1_CONTROL1 + (i * 0x40),
3454 CS48L32_IN1_PDM_SUP_MASK, dig_mode);
3455 }
3456
3457 return 0;
3458 }
3459
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki