[Sound-open-firmware] FW: [sof-driver-review:topic/sof-upstream 97/98] sound/soc/sof/ops.c:26:6: warning: 'ret' is used uninitialized in this function
Lin, Mengdong
mengdong.lin at intel.com
Mon Jun 4 10:31:40 CEST 2018
-----Original Message-----
From: lkp
Sent: Monday, June 4, 2018 1:38 PM
To: Liam Girdwood <liam.r.girdwood at linux.intel.com>
Cc: kbuild-all at 01.org; Wang, Jia W <jia.w.wang at intel.com>; Zhang, Keqiao <keqiao.zhang at intel.com>; Lin, Mengdong <mengdong.lin at intel.com>; Li, Jocelyn <jocelyn.li at intel.com>
Subject: [sof-driver-review:topic/sof-upstream 97/98] sound/soc/sof/ops.c:26:6: warning: 'ret' is used uninitialized in this function
tree: git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc.git topic/sof-upstream
head: 297c56845645fc3b2a94862be301d6e33e81d9e8
commit: d20c0648bb2590f6450f4872aea0ac3ca21f80e5 [97/98] ASoC: SOF: Dont depend on SG buffers for generic SOF core
config: arm-at91_dt_defconfig (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 d20c0648bb2590f6450f4872aea0ac3ca21f80e5
# save the attached .config to linux build tree
make.cross ARCH=arm
All warnings (new ones prefixed by >>):
sound/soc/sof/ops.c: In function 'snd_sof_pci_update_bits_unlocked':
>> sound/soc/sof/ops.c:26:6: warning: 'ret' is used uninitialized in
>> this function [-Wuninitialized]
u32 ret;
^~~
vim +/ret +26 sound/soc/sof/ops.c
cf93ce4c Liam Girdwood 2018-01-08 20
cf93ce4c Liam Girdwood 2018-01-08 21 int snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset,
cf93ce4c Liam Girdwood 2018-01-08 22 u32 mask, u32 value)
cf93ce4c Liam Girdwood 2018-01-08 23 {
cf93ce4c Liam Girdwood 2018-01-08 24 bool change;
cf93ce4c Liam Girdwood 2018-01-08 25 unsigned int old, new;
cf93ce4c Liam Girdwood 2018-01-08 @26 u32 ret;
cf93ce4c Liam Girdwood 2018-01-08 27
cf93ce4c Liam Girdwood 2018-01-08 28 pci_read_config_dword(sdev->pci, offset, &ret);
cf93ce4c Liam Girdwood 2018-01-08 29 dev_dbg(sdev->dev, "Debug PCIR: %8.8x at %8.8x\n",
cf93ce4c Liam Girdwood 2018-01-08 30 pci_read_config_dword(sdev->pci, offset, &ret), offset);
cf93ce4c Liam Girdwood 2018-01-08 31
cf93ce4c Liam Girdwood 2018-01-08 32 old = ret;
cf93ce4c Liam Girdwood 2018-01-08 33 new = (old & (~mask)) | (value & mask);
cf93ce4c Liam Girdwood 2018-01-08 34
cf93ce4c Liam Girdwood 2018-01-08 35 change = (old != new);
cf93ce4c Liam Girdwood 2018-01-08 36 if (change) {
cf93ce4c Liam Girdwood 2018-01-08 37 pci_write_config_dword(sdev->pci, offset, new);
cf93ce4c Liam Girdwood 2018-01-08 38 dev_dbg(sdev->dev, "Debug PCIW: %8.8x at %8.8x\n", value,
cf93ce4c Liam Girdwood 2018-01-08 39 offset);
cf93ce4c Liam Girdwood 2018-01-08 40 }
cf93ce4c Liam Girdwood 2018-01-08 41
cf93ce4c Liam Girdwood 2018-01-08 42 return change;
cf93ce4c Liam Girdwood 2018-01-08 43 } cf93ce4c Liam Girdwood 2018-01-08 44 EXPORT_SYMBOL(snd_sof_pci_update_bits_unlocked);
cf93ce4c Liam Girdwood 2018-01-08 45
:::::: The code at line 26 was first introduced by commit
:::::: cf93ce4c3c68c907b5508209dd75797576ef1830 ASoC: SOF: Add DSP HW abstraction operations
:::::: TO: Liam Girdwood <liam.r.girdwood at linux.intel.com>
:::::: CC: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
More information about the Sound-open-firmware
mailing list