Re: [PATCH v2 2/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vitaly,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on sound/for-next]
[also build test WARNING on v5.12-rc1 next-20210304]
[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]

url:    https://github.com/0day-ci/linux/commits/Vitaly-Rodionov/ALSA-hda-cirrus-Add-support-for-CS8409-HDA-bridge-and-CS42L42-companion-codec/20210305-030714
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: riscv-randconfig-r025-20210304 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project eec7f8f7b1226be422a76542cb403d02538f453a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/c4eca3e1e50f15e73efe5c3c605ce4e584ace51d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vitaly-Rodionov/ALSA-hda-cirrus-Add-support-for-CS8409-HDA-bridge-and-CS42L42-companion-codec/20210305-030714
        git checkout c4eca3e1e50f15e73efe5c3c605ce4e584ace51d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> sound/pci/hda/patch_cirrus.c:1511:37: warning: variable 'retval' is uninitialized when used here [-Wuninitialized]
                                   __func__, i2c_address, i2c_reg, retval);
                                                                   ^~~~~~
   sound/pci/hda/hda_local.h:723:39: note: expanded from macro 'codec_err'
           dev_err(hda_codec_dev(codec), fmt, ##args)
                                                ^~~~
   include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err'
           _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                         ^~~~~~~~~~~
   sound/pci/hda/patch_cirrus.c:1501:21: note: initialize the variable 'retval' to silence this warning
           unsigned int retval;
                              ^
                               = 0
   1 warning generated.


vim +/retval +1511 sound/pci/hda/patch_cirrus.c

  1493	
  1494	/* CS8409 slave i2cRead */
  1495	static unsigned int cs8409_i2c_read(struct hda_codec *codec,
  1496			unsigned int i2c_address,
  1497			unsigned int i2c_reg,
  1498			unsigned int paged)
  1499	{
  1500		unsigned int i2c_reg_data;
  1501		unsigned int retval;
  1502	
  1503		cs8409_enable_i2c_clock(codec, 1);
  1504		cs_vendor_coef_set(codec, CIR_I2C_ADDR, i2c_address);
  1505	
  1506		if (paged) {
  1507			cs_vendor_coef_set(codec, CIR_I2C_QWRITE, i2c_reg >> 8);
  1508			if (cs8409_i2c_wait_complete(codec) == -1) {
  1509				codec_err(codec,
  1510					"%s() Paged Transaction Failed 0x%02x : 0x%04x = 0x%02x\n",
> 1511					__func__, i2c_address, i2c_reg, retval);
  1512			}
  1513		}
  1514	
  1515		i2c_reg_data = (i2c_reg << 8) & 0x0ffff;
  1516		cs_vendor_coef_set(codec, CIR_I2C_QREAD, i2c_reg_data);
  1517		if (cs8409_i2c_wait_complete(codec) == -1) {
  1518			codec_err(codec, "%s() Transaction Failed 0x%02x : 0x%04x = 0x%02x\n",
  1519				__func__, i2c_address, i2c_reg, retval);
  1520		}
  1521	
  1522		/* Register in bits 15-8 and the data in 7-0 */
  1523		retval = cs_vendor_coef_get(codec, CIR_I2C_QREAD);
  1524		retval &= 0x0ff;
  1525	
  1526		cs8409_enable_i2c_clock(codec, 0);
  1527	
  1528		return retval;
  1529	}
  1530	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux