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: <202301062039.alEBi25O-lkp@intel.com>
Date:   Fri, 6 Jan 2023 20:40:48 +0800
From:   kernel test robot <lkp@...el.com>
To:     wangweidong.a@...nic.com, lgirdwood@...il.com, broonie@...nel.org,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        perex@...ex.cz, tiwai@...e.com, ckeepax@...nsource.cirrus.com,
        rf@...nsource.cirrus.com, pierre-louis.bossart@...ux.intel.com,
        james.schulman@...rus.com, flatmax@...tmax.com,
        cezary.rojewski@...el.com, povik+lin@...ebit.org,
        yangxiaohua@...rest-semi.com, daniel.beer@...rinstitute.com,
        13691752556@....com, srinivas.kandagatla@...aro.org,
        jonathan.albrieux@...il.com, steve@....org,
        alsa-devel@...a-project.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, liweilei@...nic.com,
        zhaolei@...nic.com, yijiangtao@...nic.com
Subject: Re: [PATCH V9 4/5] ASoC: codecs: Aw883xx chip register file, data
 type file and Kconfig Makefile

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on 1f5abbd77e2c1787e74b7c2caffac97def78ba52]

url:    https://github.com/intel-lab-lkp/linux/commits/wangweidong-a-awinic-com/ASoC-codecs-Add-i2c-and-codec-registration-for-aw883xx-and-their-associated-operation-functions/20230106-113130
base:   1f5abbd77e2c1787e74b7c2caffac97def78ba52
patch link:    https://lore.kernel.org/r/20230106032835.141918-5-wangweidong.a%40awinic.com
patch subject: [PATCH V9 4/5] ASoC: codecs: Aw883xx chip register file, data type file and Kconfig Makefile
config: powerpc-randconfig-s051-20230106
compiler: powerpc-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/63bed80c0eacb29f78eb53987b34863bafd48cee
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review wangweidong-a-awinic-com/ASoC-codecs-Add-i2c-and-codec-registration-for-aw883xx-and-their-associated-operation-functions/20230106-113130
        git checkout 63bed80c0eacb29f78eb53987b34863bafd48cee
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash sound/soc/codecs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
>> sound/soc/codecs/aw883xx/aw883xx_device.c:360:23: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short data1 @@     got restricted __le16 [usertype] @@
   sound/soc/codecs/aw883xx/aw883xx_device.c:360:23: sparse:     expected unsigned short data1
   sound/soc/codecs/aw883xx/aw883xx_device.c:360:23: sparse:     got restricted __le16 [usertype]
>> sound/soc/codecs/aw883xx/aw883xx_device.c:364:23: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int data2 @@     got restricted __le32 [usertype] @@
   sound/soc/codecs/aw883xx/aw883xx_device.c:364:23: sparse:     expected unsigned int data2
   sound/soc/codecs/aw883xx/aw883xx_device.c:364:23: sparse:     got restricted __le32 [usertype]

vim +360 sound/soc/codecs/aw883xx/aw883xx_device.c

e0362cc4ab3a79 Weidong Wang 2023-01-06  341  
e0362cc4ab3a79 Weidong Wang 2023-01-06  342  static int aw_dev_modify_dsp_cfg(struct aw_device *aw_dev,
e0362cc4ab3a79 Weidong Wang 2023-01-06  343  			unsigned int addr, unsigned int dsp_data, unsigned char data_type)
e0362cc4ab3a79 Weidong Wang 2023-01-06  344  {
e0362cc4ab3a79 Weidong Wang 2023-01-06  345  	struct aw_sec_data_desc *crc_dsp_cfg = &aw_dev->crc_dsp_cfg;
e0362cc4ab3a79 Weidong Wang 2023-01-06  346  	unsigned int addr_offset;
e0362cc4ab3a79 Weidong Wang 2023-01-06  347  	unsigned short data1;
e0362cc4ab3a79 Weidong Wang 2023-01-06  348  	unsigned int data2;
e0362cc4ab3a79 Weidong Wang 2023-01-06  349  
e0362cc4ab3a79 Weidong Wang 2023-01-06  350  	dev_dbg(aw_dev->dev, "addr:0x%x, dsp_data:0x%x", addr, dsp_data);
e0362cc4ab3a79 Weidong Wang 2023-01-06  351  
e0362cc4ab3a79 Weidong Wang 2023-01-06  352  	addr_offset = (addr - AW_PID_2049_DSP_CFG_ADDR) * 2;
e0362cc4ab3a79 Weidong Wang 2023-01-06  353  	if (addr_offset > crc_dsp_cfg->len) {
e0362cc4ab3a79 Weidong Wang 2023-01-06  354  		dev_err(aw_dev->dev, "addr_offset[%d] > crc_dsp_cfg->len[%d]",
e0362cc4ab3a79 Weidong Wang 2023-01-06  355  				addr_offset, crc_dsp_cfg->len);
e0362cc4ab3a79 Weidong Wang 2023-01-06  356  		return -EINVAL;
e0362cc4ab3a79 Weidong Wang 2023-01-06  357  	}
e0362cc4ab3a79 Weidong Wang 2023-01-06  358  	switch (data_type) {
e0362cc4ab3a79 Weidong Wang 2023-01-06  359  	case AW_DSP_16_DATA:
e0362cc4ab3a79 Weidong Wang 2023-01-06 @360  		data1 = cpu_to_le16((u16)dsp_data);
e0362cc4ab3a79 Weidong Wang 2023-01-06  361  		memcpy(crc_dsp_cfg->data + addr_offset, (u8 *)&data1, 2);
e0362cc4ab3a79 Weidong Wang 2023-01-06  362  		break;
e0362cc4ab3a79 Weidong Wang 2023-01-06  363  	case AW_DSP_32_DATA:
e0362cc4ab3a79 Weidong Wang 2023-01-06 @364  		data2 = cpu_to_le32(dsp_data);
e0362cc4ab3a79 Weidong Wang 2023-01-06  365  		memcpy(crc_dsp_cfg->data + addr_offset, (u8 *)&data2, 4);
e0362cc4ab3a79 Weidong Wang 2023-01-06  366  		break;
e0362cc4ab3a79 Weidong Wang 2023-01-06  367  	default:
e0362cc4ab3a79 Weidong Wang 2023-01-06  368  		dev_err(aw_dev->dev, "data type[%d] unsupported", data_type);
e0362cc4ab3a79 Weidong Wang 2023-01-06  369  		return -EINVAL;
e0362cc4ab3a79 Weidong Wang 2023-01-06  370  	}
e0362cc4ab3a79 Weidong Wang 2023-01-06  371  
e0362cc4ab3a79 Weidong Wang 2023-01-06  372  	return 0;
e0362cc4ab3a79 Weidong Wang 2023-01-06  373  }
e0362cc4ab3a79 Weidong Wang 2023-01-06  374  

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

View attachment "config" of type "text/plain" (180722 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ