[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210300015.TYiJIDdY-lkp@intel.com>
Date: Sun, 30 Oct 2022 00:46:57 +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: nios2-randconfig-s033-20221028
compiler: nios2-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/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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/iio/cdc/
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/cdc/ad7746.c:281:23: sparse: sparse: cast truncates bits from constant value (ffffff01 becomes 1)
drivers/iio/cdc/ad7746.c:297:23: sparse: sparse: cast truncates bits from constant value (ffffff01 becomes 1)
drivers/iio/cdc/ad7746.c: note: in included file (through include/uapi/linux/swab.h, include/linux/swab.h, include/uapi/linux/byteorder/little_endian.h, ...):
arch/nios2/include/uapi/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/uapi/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/uapi/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/uapi/asm/swab.h:25:24: sparse: sparse: too many arguments for function __builtin_custom_ini
vim +281 drivers/iio/cdc/ad7746.c
6a7e4b04df3f4f drivers/staging/iio/cdc/ad7746.c Lucas Stankus 2021-05-23 265
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 266 static int ad7746_select_channel(struct iio_dev *indio_dev,
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 267 struct iio_chan_spec const *chan)
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 268 {
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 269 struct ad7746_chip_info *chip = iio_priv(indio_dev);
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 270 u8 vt_setup, cap_setup;
afcd0b22e35e0b drivers/staging/iio/cdc/ad7746.c HernĂ¡n Gonzalez 2018-04-13 271 int ret, delay, idx;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 272
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 273 switch (chan->type) {
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 274 case IIO_CAPACITANCE:
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 275 cap_setup = FIELD_PREP(AD7746_CAPSETUP_CIN2,
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 276 ad7746_chan_info[chan->address].cin2) |
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 277 FIELD_PREP(AD7746_CAPSETUP_CAPDIFF,
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 278 ad7746_chan_info[chan->address].capdiff) |
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 279 FIELD_PREP(AD7746_CAPSETUP_CAPEN, 1);
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 280 vt_setup = chip->vt_setup & ~AD7746_VTSETUP_VTEN;
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 @281 idx = FIELD_GET(AD7746_CONF_CAPFS_MASK, chip->config);
579d542534c96c drivers/staging/iio/cdc/ad7746.c Eva Rachel Retuya 2016-10-28 282 delay = ad7746_cap_filter_rate_table[idx][1];
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 283
6a7e4b04df3f4f drivers/staging/iio/cdc/ad7746.c Lucas Stankus 2021-05-23 284 ret = ad7746_set_capdac(chip, chan->channel);
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 285 if (ret < 0)
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 286 return ret;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 287
050098500ae4f7 drivers/staging/iio/cdc/ad7746.c Alexander Vorwerk 2021-08-21 288 if (chip->capdac_set != chan->channel)
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 289 chip->capdac_set = chan->channel;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 290 break;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 291 case IIO_VOLTAGE:
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 292 case IIO_TEMP:
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 293 vt_setup = FIELD_PREP(AD7746_VTSETUP_VTMD_MASK,
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 294 ad7746_chan_info[chan->address].vtmd) |
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 295 FIELD_PREP(AD7746_VTSETUP_VTEN, 1);
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 296 cap_setup = chip->cap_setup & ~AD7746_CAPSETUP_CAPEN;
9eee2fc4a670d7 drivers/staging/iio/cdc/ad7746.c Jonathan Cameron 2022-06-26 297 idx = FIELD_GET(AD7746_CONF_VTFS_MASK, chip->config);
579d542534c96c drivers/staging/iio/cdc/ad7746.c Eva Rachel Retuya 2016-10-28 298 delay = ad7746_cap_filter_rate_table[idx][1];
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 299 break;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 300 default:
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 301 return -EINVAL;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 302 }
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 303
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 304 if (chip->cap_setup != cap_setup) {
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 305 ret = i2c_smbus_write_byte_data(chip->client,
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 306 AD7746_REG_CAP_SETUP,
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 307 cap_setup);
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 308 if (ret < 0)
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 309 return ret;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 310
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 311 chip->cap_setup = cap_setup;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 312 }
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 313
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 314 if (chip->vt_setup != vt_setup) {
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 315 ret = i2c_smbus_write_byte_data(chip->client,
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 316 AD7746_REG_VT_SETUP,
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 317 vt_setup);
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 318 if (ret < 0)
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 319 return ret;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 320
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 321 chip->vt_setup = vt_setup;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 322 }
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 323
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 324 return delay;
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 325 }
83e416f458d532 drivers/staging/iio/adc/ad7746.c Michael Hennerich 2011-09-21 326
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (137663 bytes)
Powered by blists - more mailing lists