[alsa-devel] [asoc:topic/wm9081 1/1] sound/soc/codecs/wm9081.c:1161:7: warning: 'reg' may be used uninitialized in this function
kbuild test robot
fengguang.wu at intel.com
Mon Feb 12 15:53:51 CET 2018
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git topic/wm9081
head: 48c3387642967d62fc47aff4ad0e3816bf8292e3
commit: 48c3387642967d62fc47aff4ad0e3816bf8292e3 [1/1] ASoC: wm9081: replace codec to component
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 48c3387642967d62fc47aff4ad0e3816bf8292e3
# save the attached .config to linux build tree
make.cross ARCH=arm
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
sound/soc/codecs/wm9081.c: In function 'wm9081_digital_mute':
>> sound/soc/codecs/wm9081.c:1161:7: warning: 'reg' may be used uninitialized in this function [-Wmaybe-uninitialized]
reg |= WM9081_DAC_MUTE;
vim +/reg +1161 sound/soc/codecs/wm9081.c
86ed3669 Mark Brown 2009-05-22 1152
86ed3669 Mark Brown 2009-05-22 1153 static int wm9081_digital_mute(struct snd_soc_dai *codec_dai, int mute)
86ed3669 Mark Brown 2009-05-22 1154 {
48c33876 Kuninori Morimoto 2018-01-29 1155 struct snd_soc_component *component = codec_dai->component;
86ed3669 Mark Brown 2009-05-22 1156 unsigned int reg;
86ed3669 Mark Brown 2009-05-22 1157
48c33876 Kuninori Morimoto 2018-01-29 1158 snd_soc_component_read32(component, WM9081_DAC_DIGITAL_2);
86ed3669 Mark Brown 2009-05-22 1159
86ed3669 Mark Brown 2009-05-22 1160 if (mute)
86ed3669 Mark Brown 2009-05-22 @1161 reg |= WM9081_DAC_MUTE;
86ed3669 Mark Brown 2009-05-22 1162 else
86ed3669 Mark Brown 2009-05-22 1163 reg &= ~WM9081_DAC_MUTE;
86ed3669 Mark Brown 2009-05-22 1164
48c33876 Kuninori Morimoto 2018-01-29 1165 snd_soc_component_write(component, WM9081_DAC_DIGITAL_2, reg);
86ed3669 Mark Brown 2009-05-22 1166
86ed3669 Mark Brown 2009-05-22 1167 return 0;
86ed3669 Mark Brown 2009-05-22 1168 }
86ed3669 Mark Brown 2009-05-22 1169
:::::: The code at line 1161 was first introduced by commit
:::::: 86ed3669f068b514ab85ffd548456a342b3fb8d3 ASoC: WM9081 mono DAC with integrated 2.6W class AB/D amplifier driver
:::::: TO: Mark Brown <broonie at opensource.wolfsonmicro.com>
:::::: CC: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 65156 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20180212/bf4ab87e/attachment-0001.bin>
More information about the Alsa-devel
mailing list