[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202512130749.Yq1y2hjQ-lkp@intel.com>
Date: Sat, 13 Dec 2025 14:17:49 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev,
Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.dev>
Subject: sound/soc/sdca/sdca_asoc.c:381 entity_pde_event() error:
uninitialized symbol 'poll_us'.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 187d0801404f415f22c0b31531982c7ea97fa341
commit: 2c8b3a8e6aa877583e5dc2f669a8adc896a771d4 ASoC: SDCA: Create DAPM widgets and routes from DisCo
config: i386-randconfig-r073-20251212 (https://download.01.org/0day-ci/archive/20251213/202512130749.Yq1y2hjQ-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
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@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202512130749.Yq1y2hjQ-lkp@intel.com/
New smatch warnings:
sound/soc/sdca/sdca_asoc.c:381 entity_pde_event() error: uninitialized symbol 'poll_us'.
vim +/poll_us +381 sound/soc/sdca/sdca_asoc.c
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 341 static int entity_pde_event(struct snd_soc_dapm_widget *widget,
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 342 struct snd_kcontrol *kctl, int event)
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 343 {
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 344 struct snd_soc_component *component = widget->dapm->component;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 345 struct sdca_entity *entity = widget->priv;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 346 static const int polls = 100;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 347 unsigned int reg, val;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 348 int from, to, i;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 349 int poll_us;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 350 int ret;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 351
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 352 if (!component)
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 353 return -EIO;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 354
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 355 switch (event) {
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 356 case SND_SOC_DAPM_POST_PMD:
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 357 from = widget->on_val;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 358 to = widget->off_val;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 359 break;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 360 case SND_SOC_DAPM_POST_PMU:
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 361 from = widget->off_val;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 362 to = widget->on_val;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 363 break;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 364 }
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 365
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 366 for (i = 0; i < entity->pde.num_max_delay; i++) {
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 367 struct sdca_pde_delay *delay = &entity->pde.max_delay[i];
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 368
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 369 if (delay->from_ps == from && delay->to_ps == to) {
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 370 poll_us = delay->us / polls;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 371 break;
If we exit the loop without hitting this break then we'd be in trouble.
It's not clear if that's really possible...
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 372 }
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 373 }
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 374
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 375 reg = SDW_SDCA_CTL(SDW_SDCA_CTL_FUNC(widget->reg),
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 376 SDW_SDCA_CTL_ENT(widget->reg),
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 377 SDCA_CTL_PDE_ACTUAL_PS, 0);
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 378
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 379 for (i = 0; i < polls; i++) {
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 380 if (i)
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 @381 fsleep(poll_us);
^^^^^^^
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 382
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 383 ret = regmap_read(component->regmap, reg, &val);
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 384 if (ret)
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 385 return ret;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 386 else if (val == to)
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 387 return 0;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 388 }
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 389
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 390 dev_err(component->dev, "%s: power transition failed: %x\n",
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 391 entity->label, val);
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 392 return -ETIMEDOUT;
2c8b3a8e6aa8775 Charles Keepax 2025-05-16 393 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists