mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alex Tran <alex.t.tran@gmail.com>, broonie@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	lgirdwood@gmail.com, tiwai@suse.com, perex@perex.cz,
	shenghao-ding@ti.com, kevin-lu@ti.com, baojun.xu@ti.com,
	linus.walleij@linaro.org, brgl@bgdev.pl,
	linux-sound@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org, Alex Tran <alex.t.tran@gmail.com>
Subject: Re: [PATCH v2] ASoC: codecs: tlv320dac33: switch to gpiod api
Date: Tue, 2 Sep 2025 00:35:58 +0800	[thread overview]
Message-ID: <202509020014.XuEeJtZr-lkp@intel.com> (raw)
In-Reply-To: <20250901035956.1195081-1-alex.t.tran@gmail.com>

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@intel.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

      parent reply	other threads:[~2025-09-01 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01  3:59 Alex Tran
2025-09-01 10:35 ` Mark Brown
2025-09-01 18:09   ` Alex Tran
2025-09-01 16:35 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202509020014.XuEeJtZr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alex.t.tran@gmail.com \
    --cc=baojun.xu@ti.com \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=kevin-lu@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=perex@perex.cz \
    --cc=shenghao-ding@ti.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®