[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202509020014.XuEeJtZr-lkp@intel.com>
Date: Tue, 2 Sep 2025 00:35:58 +0800
From: kernel test robot <lkp@...el.com>
To: Alex Tran <alex.t.tran@...il.com>, broonie@...nel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
lgirdwood@...il.com, tiwai@...e.com, perex@...ex.cz,
shenghao-ding@...com, kevin-lu@...com, baojun.xu@...com,
linus.walleij@...aro.org, brgl@...ev.pl,
linux-sound@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, Alex Tran <alex.t.tran@...il.com>
Subject: Re: [PATCH v2] ASoC: codecs: tlv320dac33: switch to gpiod api
Hi Alex,
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 linus/master v6.17-rc4 next-20250901]
[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/Alex-Tran/ASoC-codecs-tlv320dac33-switch-to-gpiod-api/20250901-120204
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20250901035956.1195081-1-alex.t.tran%40gmail.com
patch subject: [PATCH v2] ASoC: codecs: tlv320dac33: switch to gpiod api
config: loongarch-randconfig-002-20250901 (https://download.01.org/0day-ci/archive/20250902/202509020014.XuEeJtZr-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250902/202509020014.XuEeJtZr-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509020014.XuEeJtZr-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> sound/soc/codecs/tlv320dac33.c:1506:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
1506 | if (IS_ERR(dac33->reset_gpiod)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/tlv320dac33.c:1531:9: note: uninitialized use occurs here
1531 | return ret;
| ^~~
sound/soc/codecs/tlv320dac33.c:1506:2: note: remove the 'if' if its condition is always false
1506 | if (IS_ERR(dac33->reset_gpiod)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1507 | dev_err_probe(&client->dev, PTR_ERR(dac33->reset_gpiod),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1508 | "Failed to get reset GPIO\n");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1509 | goto err;
| ~~~~~~~~~
1510 | }
| ~
sound/soc/codecs/tlv320dac33.c:1477:9: note: initialize the variable 'ret' to silence this warning
1477 | int ret, i;
| ^
| = 0
1 warning generated.
vim +1506 sound/soc/codecs/tlv320dac33.c
1473
1474 static int dac33_i2c_probe(struct i2c_client *client)
1475 {
1476 struct tlv320dac33_priv *dac33;
1477 int ret, i;
1478
1479 dac33 = devm_kzalloc(&client->dev, sizeof(struct tlv320dac33_priv),
1480 GFP_KERNEL);
1481 if (dac33 == NULL)
1482 return -ENOMEM;
1483
1484 dac33->reg_cache = devm_kmemdup_array(&client->dev, dac33_reg, ARRAY_SIZE(dac33_reg),
1485 sizeof(dac33_reg[0]), GFP_KERNEL);
1486 if (!dac33->reg_cache)
1487 return -ENOMEM;
1488
1489 dac33->i2c = client;
1490 mutex_init(&dac33->mutex);
1491 spin_lock_init(&dac33->lock);
1492
1493 i2c_set_clientdata(client, dac33);
1494
1495 if (!dac33->burst_bclkdiv)
1496 dac33->burst_bclkdiv = 8;
1497 if (!dac33->mode1_latency)
1498 dac33->mode1_latency = 10000; /* 10ms */
1499 dac33->irq = client->irq;
1500 /* Disable FIFO use by default */
1501 dac33->fifo_mode = DAC33_FIFO_BYPASS;
1502
1503 /* request optional reset GPIO */
1504 dac33->reset_gpiod =
1505 devm_gpiod_get_optional(&client->dev, "reset", GPIOD_OUT_LOW);
> 1506 if (IS_ERR(dac33->reset_gpiod)) {
1507 dev_err_probe(&client->dev, PTR_ERR(dac33->reset_gpiod),
1508 "Failed to get reset GPIO\n");
1509 goto err;
1510 }
1511
1512 for (i = 0; i < ARRAY_SIZE(dac33->supplies); i++)
1513 dac33->supplies[i].supply = dac33_supply_names[i];
1514
1515 ret = devm_regulator_bulk_get(&client->dev, ARRAY_SIZE(dac33->supplies),
1516 dac33->supplies);
1517
1518 if (ret != 0) {
1519 dev_err(&client->dev, "Failed to request supplies: %d\n", ret);
1520 goto err;
1521 }
1522
1523 ret = devm_snd_soc_register_component(&client->dev,
1524 &soc_component_dev_tlv320dac33, &dac33_dai, 1);
1525 if (ret < 0)
1526 goto err;
1527
1528 return ret;
1529
1530 err:
1531 return ret;
1532 }
1533
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists