[jic23-iio:testing 146/151] drivers/iio/chemical/scd4x.c:273:27: sparse: sparse: cast to restricted __be16
From: kernel test robot
Date: Tue Oct 12 2021 - 06:21:30 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head: 687109cbbfd744cba8aea3580770dcf6e13ce12a
commit: d82f732078b7a91b5cdde048fa1bc59f2400e21a [146/151] drivers: iio: chemical: Add support for Sensirion SCD4x CO2 sensor
config: alpha-randconfig-s032-20211012 (attached as .config)
compiler: alpha-linux-gcc (GCC) 11.2.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-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?id=d82f732078b7a91b5cdde048fa1bc59f2400e21a
git remote add jic23-iio https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
git fetch --no-tags jic23-iio testing
git checkout d82f732078b7a91b5cdde048fa1bc59f2400e21a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/iio/chemical/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/chemical/scd4x.c:273:27: sparse: sparse: cast to restricted __be16
>> drivers/iio/chemical/scd4x.c:273:27: sparse: sparse: cast to restricted __be16
>> drivers/iio/chemical/scd4x.c:273:27: sparse: sparse: cast to restricted __be16
>> drivers/iio/chemical/scd4x.c:273:27: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:290:23: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:290:23: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:290:23: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:290:23: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:376:24: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:376:24: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:376:24: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:376:24: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:418:16: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:418:16: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:418:16: sparse: sparse: cast to restricted __be16
drivers/iio/chemical/scd4x.c:418:16: sparse: sparse: cast to restricted __be16
vim +273 drivers/iio/chemical/scd4x.c
262
263 static int scd4x_read_meas(struct scd4x_state *state, uint16_t *meas)
264 {
265 int i, ret;
266 uint16_t buf[3];
267
268 ret = scd4x_read(state, CMD_READ_MEAS, buf, sizeof(buf));
269 if (ret)
270 return ret;
271
272 for (i = 0; i < ARRAY_SIZE(buf); i++)
> 273 meas[i] = be16_to_cpu(buf[i]);
274
275 return 0;
276 }
277
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip