lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202507190618.Gu5xvSUt-lkp@intel.com>
Date: Sat, 19 Jul 2025 06:40:51 +0800
From: kernel test robot <lkp@...el.com>
To: Nick <nick.li@...rsemi.com>, lgirdwood@...il.com, broonie@...nel.org,
	robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
	perex@...ex.cz, tiwai@...e.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	xiaoming.yang@...rsemi.com, danyang.zheng@...rsemi.com,
	like.xy@...mail.com, linux-sound@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/4] ASoC: codecs: Add FourSemi FS2104/5S audio
 amplifier driver

Hi Nick,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ed73a24357531e1747a6e140c329015da6429629]

url:    https://github.com/intel-lab-lkp/linux/commits/Nick/dt-bindings-vendor-prefixes-Add-Shanghai-FourSemi-Semiconductor-Co-Ltd/20250718-201609
base:   ed73a24357531e1747a6e140c329015da6429629
patch link:    https://lore.kernel.org/r/20250718121221.76957-5-nick.li%40foursemi.com
patch subject: [PATCH v3 4/4] ASoC: codecs: Add FourSemi FS2104/5S audio amplifier driver
config: i386-buildonly-randconfig-004-20250719 (https://download.01.org/0day-ci/archive/20250719/202507190618.Gu5xvSUt-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250719/202507190618.Gu5xvSUt-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/202507190618.Gu5xvSUt-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/codecs/fs210x.c:1086:2: warning: variable 'ret' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
    1086 |         default:
         |         ^~~~~~~
   sound/soc/codecs/fs210x.c:1092:9: note: uninitialized use occurs here
    1092 |         return ret;
         |                ^~~
>> sound/soc/codecs/fs210x.c:1077:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    1077 |                 if (!fs210x->clk_bclk)
         |                     ^~~~~~~~~~~~~~~~~
   sound/soc/codecs/fs210x.c:1092:9: note: uninitialized use occurs here
    1092 |         return ret;
         |                ^~~
   sound/soc/codecs/fs210x.c:1077:3: note: remove the 'if' if its condition is always false
    1077 |                 if (!fs210x->clk_bclk)
         |                 ^~~~~~~~~~~~~~~~~~~~~~
    1078 |                         break;
         |                         ~~~~~
   sound/soc/codecs/fs210x.c:1062:9: note: initialize the variable 'ret' to silence this warning
    1062 |         int ret;
         |                ^
         |                 = 0
   2 warnings generated.


vim +/ret +1086 sound/soc/codecs/fs210x.c

  1056	
  1057	static int fs210x_playback_event(struct snd_soc_dapm_widget *w,
  1058					 struct snd_kcontrol *kc, int event)
  1059	{
  1060		struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
  1061		struct fs210x_priv *fs210x = snd_soc_component_get_drvdata(cmpnt);
  1062		int ret;
  1063	
  1064		mutex_lock(&fs210x->lock);
  1065	
  1066		if (fs210x->is_suspended) {
  1067			mutex_unlock(&fs210x->lock);
  1068			return 0;
  1069		}
  1070	
  1071		switch (event) {
  1072		case SND_SOC_DAPM_PRE_PMU:
  1073			/*
  1074			 * If there is no bclk for us to set the clock output,
  1075			 * we will enable the device(start_work) in dai trigger.
  1076			 */
> 1077			if (!fs210x->clk_bclk)
  1078				break;
  1079			fs210x_bclk_set(fs210x, true);
  1080			ret = fs210x_dev_play(fs210x);
  1081			break;
  1082		case SND_SOC_DAPM_POST_PMD:
  1083			ret = fs210x_dev_stop(fs210x);
  1084			fs210x_bclk_set(fs210x, false);
  1085			break;
> 1086		default:
  1087			break;
  1088		}
  1089	
  1090		mutex_unlock(&fs210x->lock);
  1091	
  1092		return ret;
  1093	}
  1094	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ