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]
Date:   Sat, 31 Dec 2022 11:06:59 +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, povik+lin@...ebit.org,
        pierre-louis.bossart@...ux.intel.com, james.schulman@...rus.com,
        flatmax@...tmax.com, cezary.rojewski@...el.com,
        srinivas.kandagatla@...aro.org, tanureal@...nsource.cirrus.com,
        steve@....org, stephan@...hold.net, zhuning0077@...il.com,
        shumingf@...ltek.com, alsa-devel@...a-project.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, zhaolei@...nic.com,
        liweilei@...nic.com, yijiangtao@...nic.com, duanyibo@...nic.com
Subject: Re: [PATCH V8 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 bff687b3dad6e0e56b27f4d3ed8a9695f35c7b1a]

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/20221230-173723
base:   bff687b3dad6e0e56b27f4d3ed8a9695f35c7b1a
patch link:    https://lore.kernel.org/r/20221230093454.190579-5-wangweidong.a%40awinic.com
patch subject: [PATCH V8 4/5] ASoC: codecs: Aw883xx chip register file, data type file and Kconfig Makefile
config: loongarch-randconfig-s043-20221225
compiler: loongarch64-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/870b0ec7349df27824602f880bb5a2118aec84e5
        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/20221230-173723
        git checkout 870b0ec7349df27824602f880bb5a2118aec84e5
        # 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=loongarch 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=loongarch 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:367:23: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] data1 @@     got restricted __le16 [usertype] @@
   sound/soc/codecs/aw883xx/aw883xx_device.c:367:23: sparse:     expected unsigned short [usertype] data1
   sound/soc/codecs/aw883xx/aw883xx_device.c:367:23: sparse:     got restricted __le16 [usertype]
>> sound/soc/codecs/aw883xx/aw883xx_device.c:371:23: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] data2 @@     got restricted __le32 [usertype] @@
   sound/soc/codecs/aw883xx/aw883xx_device.c:371:23: sparse:     expected unsigned int [usertype] data2
   sound/soc/codecs/aw883xx/aw883xx_device.c:371:23: sparse:     got restricted __le32 [usertype]

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

acf2ebfd20ae60 Weidong Wang 2022-12-30  348  
acf2ebfd20ae60 Weidong Wang 2022-12-30  349  static int aw_dev_modify_dsp_cfg(struct aw_device *aw_dev,
acf2ebfd20ae60 Weidong Wang 2022-12-30  350  			unsigned int addr, unsigned int dsp_data, unsigned char data_type)
acf2ebfd20ae60 Weidong Wang 2022-12-30  351  {
acf2ebfd20ae60 Weidong Wang 2022-12-30  352  	struct aw_sec_data_desc *crc_dsp_cfg = &aw_dev->crc_dsp_cfg;
acf2ebfd20ae60 Weidong Wang 2022-12-30  353  	u32 addr_offset;
acf2ebfd20ae60 Weidong Wang 2022-12-30  354  	u16 data1;
acf2ebfd20ae60 Weidong Wang 2022-12-30  355  	u32 data2;
acf2ebfd20ae60 Weidong Wang 2022-12-30  356  
acf2ebfd20ae60 Weidong Wang 2022-12-30  357  	dev_dbg(aw_dev->dev, "addr:0x%x, dsp_data:0x%x", addr, dsp_data);
acf2ebfd20ae60 Weidong Wang 2022-12-30  358  
acf2ebfd20ae60 Weidong Wang 2022-12-30  359  	addr_offset = (addr - AW_PID_2049_DSP_CFG_ADDR) * 2;
acf2ebfd20ae60 Weidong Wang 2022-12-30  360  	if (addr_offset > crc_dsp_cfg->len) {
acf2ebfd20ae60 Weidong Wang 2022-12-30  361  		dev_err(aw_dev->dev, "addr_offset[%d] > crc_dsp_cfg->len[%d]",
acf2ebfd20ae60 Weidong Wang 2022-12-30  362  				addr_offset, crc_dsp_cfg->len);
acf2ebfd20ae60 Weidong Wang 2022-12-30  363  		return -EINVAL;
acf2ebfd20ae60 Weidong Wang 2022-12-30  364  	}
acf2ebfd20ae60 Weidong Wang 2022-12-30  365  	switch (data_type) {
acf2ebfd20ae60 Weidong Wang 2022-12-30  366  	case AW_DSP_16_DATA:
acf2ebfd20ae60 Weidong Wang 2022-12-30 @367  		data1 = cpu_to_le16((u16)dsp_data);
acf2ebfd20ae60 Weidong Wang 2022-12-30  368  		memcpy(crc_dsp_cfg->data + addr_offset, (u8 *)&data1, 2);
acf2ebfd20ae60 Weidong Wang 2022-12-30  369  		break;
acf2ebfd20ae60 Weidong Wang 2022-12-30  370  	case AW_DSP_32_DATA:
acf2ebfd20ae60 Weidong Wang 2022-12-30 @371  		data2 = cpu_to_le32(dsp_data);
acf2ebfd20ae60 Weidong Wang 2022-12-30  372  		memcpy(crc_dsp_cfg->data + addr_offset, (u8 *)&data2, 4);
acf2ebfd20ae60 Weidong Wang 2022-12-30  373  		break;
acf2ebfd20ae60 Weidong Wang 2022-12-30  374  	default:
acf2ebfd20ae60 Weidong Wang 2022-12-30  375  		dev_err(aw_dev->dev, "data type[%d] unsupported", data_type);
acf2ebfd20ae60 Weidong Wang 2022-12-30  376  		return -EINVAL;
acf2ebfd20ae60 Weidong Wang 2022-12-30  377  	}
acf2ebfd20ae60 Weidong Wang 2022-12-30  378  
acf2ebfd20ae60 Weidong Wang 2022-12-30  379  	return 0;
acf2ebfd20ae60 Weidong Wang 2022-12-30  380  }
acf2ebfd20ae60 Weidong Wang 2022-12-30  381  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ