public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chris Morgan <macroalpha82@gmail.com>, linux-sound@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	devicetree@vger.kernel.org, wangweidong.a@awinic.com,
	tiwai@suse.com, perex@perex.cz, conor+dt@kernel.org,
	krzk+dt@kernel.org, robh@kernel.org, broonie@kernel.org,
	lgirdwood@gmail.com, Chris Morgan <macromorgan@hotmail.com>
Subject: Re: [PATCH 2/2] ASoC: codecs: aw87390: Add Anbernic RG-DS amplifier driver
Date: Sat, 24 Jan 2026 07:32:45 +0800	[thread overview]
Message-ID: <202601240757.gYdQGsXp-lkp@intel.com> (raw)
In-Reply-To: <20260123154731.130649-3-macroalpha82@gmail.com>

Hi Chris,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on linus/master v6.19-rc6 next-20260122]
[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/Chris-Morgan/ASoC-dt-bindings-aw87390-Add-Anbernic-RG-DS-Amplifier/20260123-235216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20260123154731.130649-3-macroalpha82%40gmail.com
patch subject: [PATCH 2/2] ASoC: codecs: aw87390: Add Anbernic RG-DS amplifier driver
config: sparc64-randconfig-001-20260124 (https://download.01.org/0day-ci/archive/20260124/202601240757.gYdQGsXp-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260124/202601240757.gYdQGsXp-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/202601240757.gYdQGsXp-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/codecs/aw87390.c:343:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
     343 |         case SND_SOC_DAPM_POST_PMD:
         |              ^~~~~~~~~~~~~~~~~~~~~
   include/sound/soc-dapm.h:388:32: note: expanded from macro 'SND_SOC_DAPM_POST_PMD'
     388 | #define SND_SOC_DAPM_POST_PMD           0x8     /* after  widget power down */
         |                                         ^~~
   sound/soc/codecs/aw87390.c:354:9: note: uninitialized use occurs here
     354 |         return ret;
         |                ^~~
   sound/soc/codecs/aw87390.c:339:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
     339 |         case SND_SOC_DAPM_PRE_PMD:
         |              ^~~~~~~~~~~~~~~~~~~~
   include/sound/soc-dapm.h:387:31: note: expanded from macro 'SND_SOC_DAPM_PRE_PMD'
     387 | #define SND_SOC_DAPM_PRE_PMD            0x4     /* before widget power down */
         |                                         ^~~
   sound/soc/codecs/aw87390.c:354:9: note: uninitialized use occurs here
     354 |         return ret;
         |                ^~~
   sound/soc/codecs/aw87390.c:332:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
     332 |         case SND_SOC_DAPM_POST_PMU:
         |              ^~~~~~~~~~~~~~~~~~~~~
   include/sound/soc-dapm.h:386:32: note: expanded from macro 'SND_SOC_DAPM_POST_PMU'
     386 | #define SND_SOC_DAPM_POST_PMU           0x2     /* after  widget power up */
         |                                         ^~~
   sound/soc/codecs/aw87390.c:354:9: note: uninitialized use occurs here
     354 |         return ret;
         |                ^~~
   sound/soc/codecs/aw87390.c:326:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
     326 |         case SND_SOC_DAPM_PRE_PMU:
         |              ^~~~~~~~~~~~~~~~~~~~
   include/sound/soc-dapm.h:385:31: note: expanded from macro 'SND_SOC_DAPM_PRE_PMU'
     385 | #define SND_SOC_DAPM_PRE_PMU            0x1     /* before widget power up */
         |                                         ^~~
   sound/soc/codecs/aw87390.c:354:9: note: uninitialized use occurs here
     354 |         return ret;
         |                ^~~
   sound/soc/codecs/aw87390.c:323:9: note: initialize the variable 'ret' to silence this warning
     323 |         int ret;
         |                ^
         |                 = 0
   4 warnings generated.


vim +/ret +343 sound/soc/codecs/aw87390.c

   316	
   317	static int aw87391_rgds_drv_event(struct snd_soc_dapm_widget *w,
   318					struct snd_kcontrol *kcontrol, int event)
   319	{
   320		struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
   321		struct aw87390 *aw87390 = snd_soc_component_get_drvdata(component);
   322		struct aw_device *aw_dev = aw87390->aw_pa;
   323		int ret;
   324	
   325		switch (event) {
   326		case SND_SOC_DAPM_PRE_PMU:
   327			if (!IS_ERR(aw87390->vdd_reg)) {
   328				if (regulator_enable(aw87390->vdd_reg))
   329					dev_err(aw_dev->dev, "Failed to enable vdd\n");
   330		}
   331			break;
   332		case SND_SOC_DAPM_POST_PMU:
   333			regmap_write(aw_dev->regmap, AW87391_SYSCTRL_REG,
   334				     AW87391_REG_VER_SEL_LOW | AW87391_REG_EN_ADAP |
   335				     AW87391_REG_EN_2X | AW87391_EN_SPK |
   336				     AW87391_EN_PA | AW87391_REG_EN_CP |
   337				     AW87391_EN_SW);
   338			break;
   339		case SND_SOC_DAPM_PRE_PMD:
   340			regmap_write(aw_dev->regmap, AW87390_SYSCTRL_REG,
   341				     AW87390_POWER_DOWN_VALUE);
   342			break;
 > 343		case SND_SOC_DAPM_POST_PMD:
   344			if (!IS_ERR(aw87390->vdd_reg)) {
   345				if (regulator_disable(aw87390->vdd_reg))
   346					dev_err(aw_dev->dev, "Failed to disable vdd\n");
   347		}
   348			break;
   349		default:
   350			dev_err(aw_dev->dev, "%s: invalid event %d\n", __func__, event);
   351			ret = -EINVAL;
   352		}
   353	
   354		return ret;
   355	}
   356	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      reply	other threads:[~2026-01-23 23:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 15:47 [PATCH 0/2] Anbernic RG-DS AW87391 Speaker Amps Chris Morgan
2026-01-23 15:47 ` [PATCH 1/2] ASoC: dt-bindings: aw87390: Add Anbernic RG-DS Amplifier Chris Morgan
2026-01-23 17:09   ` Conor Dooley
2026-01-23 15:47 ` [PATCH 2/2] ASoC: codecs: aw87390: Add Anbernic RG-DS amplifier driver Chris Morgan
2026-01-23 23:32   ` 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=202601240757.gYdQGsXp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=macroalpha82@gmail.com \
    --cc=macromorgan@hotmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.com \
    --cc=wangweidong.a@awinic.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