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, 29 Oct 2022 23:05:58 +0800
From:   kernel test robot <lkp@...el.com>
To:     Gwan-gyeong Mun <gwan-gyeong.mun@...el.com>,
        ndesaulniers@...gle.com
Cc:     oe-kbuild-all@...ts.linux.dev, peterz@...radead.org,
        llvm@...ts.linux.dev, ashutosh.dixit@...el.com,
        andi.shyti@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bitfield: Use argument type for size comparison on
 Bitfield access macros

Hi Gwan-gyeong,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.1-rc2 next-20221028]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Gwan-gyeong-Mun/bitfield-Use-argument-type-for-size-comparison-on-Bitfield-access-macros/20221029-133640
patch link:    https://lore.kernel.org/r/20221029053429.38381-1-gwan-gyeong.mun%40intel.com
patch subject: [PATCH] bitfield: Use argument type for size comparison on Bitfield access macros
config: i386-randconfig-s001
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/91f22fce5cc0639c001bcf755c9dec0913073876
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Gwan-gyeong-Mun/bitfield-Use-argument-type-for-size-comparison-on-Bitfield-access-macros/20221029-133640
        git checkout 91f22fce5cc0639c001bcf755c9dec0913073876
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/iio/accel/

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 >>)
>> drivers/iio/accel/adxl372.c:341:46: sparse: sparse: cast truncates bits from constant value (ffff0001 becomes 1)
   drivers/iio/accel/adxl372.c:346:34: sparse: sparse: cast truncates bits from constant value (ffff0001 becomes 1)

vim +341 drivers/iio/accel/adxl372.c

b0fc6783d4ae58 Stefan Popa 2020-08-10  333  
b0fc6783d4ae58 Stefan Popa 2020-08-10  334  static ssize_t adxl372_write_threshold_value(struct iio_dev *indio_dev, unsigned int addr,
b0fc6783d4ae58 Stefan Popa 2020-08-10  335  					     u16 threshold)
b0fc6783d4ae58 Stefan Popa 2020-08-10  336  {
b0fc6783d4ae58 Stefan Popa 2020-08-10  337  	struct adxl372_state *st = iio_priv(indio_dev);
b0fc6783d4ae58 Stefan Popa 2020-08-10  338  	int ret;
b0fc6783d4ae58 Stefan Popa 2020-08-10  339  
b0fc6783d4ae58 Stefan Popa 2020-08-10  340  	mutex_lock(&st->threshold_m);
b0fc6783d4ae58 Stefan Popa 2020-08-10 @341  	ret = regmap_write(st->regmap, addr, ADXL372_THRESH_VAL_H_SEL(threshold));
b0fc6783d4ae58 Stefan Popa 2020-08-10  342  	if (ret < 0)
b0fc6783d4ae58 Stefan Popa 2020-08-10  343  		goto unlock;
b0fc6783d4ae58 Stefan Popa 2020-08-10  344  
b0fc6783d4ae58 Stefan Popa 2020-08-10  345  	ret = regmap_update_bits(st->regmap, addr + 1, GENMASK(7, 5),
b0fc6783d4ae58 Stefan Popa 2020-08-10  346  				 ADXL372_THRESH_VAL_L_SEL(threshold) << 5);
b0fc6783d4ae58 Stefan Popa 2020-08-10  347  
b0fc6783d4ae58 Stefan Popa 2020-08-10  348  unlock:
b0fc6783d4ae58 Stefan Popa 2020-08-10  349  	mutex_unlock(&st->threshold_m);
b0fc6783d4ae58 Stefan Popa 2020-08-10  350  
b0fc6783d4ae58 Stefan Popa 2020-08-10  351  	return ret;
b0fc6783d4ae58 Stefan Popa 2020-08-10  352  }
b0fc6783d4ae58 Stefan Popa 2020-08-10  353  

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ