Content-Type: multipart/mixed; boundary="===============5063528184423217525==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v1 1/1] iio: chemical: atlas-ezo-sensor: Make use of device properties Date: Fri, 04 Feb 2022 00:09:26 +0800 Message-ID: <202202040047.MYaXoBXz-lkp@intel.com> In-Reply-To: <20220203122543.75814-1-andriy.shevchenko@linux.intel.com> List-Id: --===============5063528184423217525== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Andy, I love your patch! Yet something to improve: [auto build test ERROR on jic23-iio/togreg] [also build test ERROR on v5.17-rc2 next-20220203] [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] url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/iio-chemic= al-atlas-ezo-sensor-Make-use-of-device-properties/20220203-202716 base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg config: hexagon-randconfig-r041-20220203 (https://download.01.org/0day-ci/a= rchive/20220204/202202040047.MYaXoBXz-lkp(a)intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a73e4c= e6a59b01f0e37037761c1e6889d539d233) reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/262e5b667d25332f90b88e686= 9ba161b11e8f88e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Andy-Shevchenko/iio-chemical-atlas= -ezo-sensor-Make-use-of-device-properties/20220203-202716 git checkout 262e5b667d25332f90b88e6869ba161b11e8f88e # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Dhexagon SHELL=3D/bin/bash drivers/iio/chemical/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): >> drivers/iio/chemical/atlas-ezo-sensor.c:183:21: warning: incompatible po= inter to integer conversion initializing 'kernel_ulong_t' (aka 'unsigned lo= ng') with an expression of type 'struct atlas_ezo_device *' [-Wint-conversi= on] { "atlas-co2-ezo", &atlas_ezo_devices[0] }, ^~~~~~~~~~~~~~~~~~~~~ drivers/iio/chemical/atlas-ezo-sensor.c:184:20: warning: incompatible po= inter to integer conversion initializing 'kernel_ulong_t' (aka 'unsigned lo= ng') with an expression of type 'struct atlas_ezo_device *' [-Wint-conversi= on] { "atlas-o2-ezo", &atlas_ezo_devices[1] }, ^~~~~~~~~~~~~~~~~~~~~ drivers/iio/chemical/atlas-ezo-sensor.c:185:21: warning: incompatible po= inter to integer conversion initializing 'kernel_ulong_t' (aka 'unsigned lo= ng') with an expression of type 'struct atlas_ezo_device *' [-Wint-conversi= on] { "atlas-hum-ezo", &atlas_ezo_devices[2] }, ^~~~~~~~~~~~~~~~~~~~~ >> drivers/iio/chemical/atlas-ezo-sensor.c:221:13: error: assigning to 'str= uct atlas_ezo_device *' from 'const struct atlas_ezo_device *' discards qua= lifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] data->chip =3D chip; ^ ~~~~ 3 warnings and 1 error generated. vim +221 drivers/iio/chemical/atlas-ezo-sensor.c 8712b3098b3d03 Matt Ranostay 2020-05-11 181 = 8712b3098b3d03 Matt Ranostay 2020-05-11 182 static const struct i2c_dev= ice_id atlas_ezo_id[] =3D { 262e5b667d2533 Andy Shevchenko 2022-02-03 @183 { "atlas-co2-ezo", &atlas_= ezo_devices[0] }, 262e5b667d2533 Andy Shevchenko 2022-02-03 184 { "atlas-o2-ezo", &atlas_e= zo_devices[1] }, 262e5b667d2533 Andy Shevchenko 2022-02-03 185 { "atlas-hum-ezo", &atlas_= ezo_devices[2] }, 8712b3098b3d03 Matt Ranostay 2020-05-11 186 {} 8712b3098b3d03 Matt Ranostay 2020-05-11 187 }; 8712b3098b3d03 Matt Ranostay 2020-05-11 188 MODULE_DEVICE_TABLE(i2c, at= las_ezo_id); 8712b3098b3d03 Matt Ranostay 2020-05-11 189 = 8712b3098b3d03 Matt Ranostay 2020-05-11 190 static const struct of_devi= ce_id atlas_ezo_dt_ids[] =3D { 262e5b667d2533 Andy Shevchenko 2022-02-03 191 { .compatible =3D "atlas,c= o2-ezo", .data =3D &atlas_ezo_devices[0], }, 262e5b667d2533 Andy Shevchenko 2022-02-03 192 { .compatible =3D "atlas,o= 2-ezo", .data =3D &atlas_ezo_devices[1], }, 262e5b667d2533 Andy Shevchenko 2022-02-03 193 { .compatible =3D "atlas,h= um-ezo", .data =3D &atlas_ezo_devices[2], }, 8712b3098b3d03 Matt Ranostay 2020-05-11 194 {} 8712b3098b3d03 Matt Ranostay 2020-05-11 195 }; 8712b3098b3d03 Matt Ranostay 2020-05-11 196 MODULE_DEVICE_TABLE(of, atl= as_ezo_dt_ids); 8712b3098b3d03 Matt Ranostay 2020-05-11 197 = 8712b3098b3d03 Matt Ranostay 2020-05-11 198 static int atlas_ezo_probe(= struct i2c_client *client, 8712b3098b3d03 Matt Ranostay 2020-05-11 199 const struct i2c_d= evice_id *id) 8712b3098b3d03 Matt Ranostay 2020-05-11 200 { 262e5b667d2533 Andy Shevchenko 2022-02-03 201 const struct atlas_ezo_dev= ice *chip; 8712b3098b3d03 Matt Ranostay 2020-05-11 202 struct atlas_ezo_data *dat= a; 8712b3098b3d03 Matt Ranostay 2020-05-11 203 struct iio_dev *indio_dev; 8712b3098b3d03 Matt Ranostay 2020-05-11 204 = 8712b3098b3d03 Matt Ranostay 2020-05-11 205 indio_dev =3D devm_iio_dev= ice_alloc(&client->dev, sizeof(*data)); 8712b3098b3d03 Matt Ranostay 2020-05-11 206 if (!indio_dev) 8712b3098b3d03 Matt Ranostay 2020-05-11 207 return -ENOMEM; 8712b3098b3d03 Matt Ranostay 2020-05-11 208 = 262e5b667d2533 Andy Shevchenko 2022-02-03 209 chip =3D device_get_match_= data(&client->dev); 262e5b667d2533 Andy Shevchenko 2022-02-03 210 if (!chip) 262e5b667d2533 Andy Shevchenko 2022-02-03 211 chip =3D (const struct at= las_ezo_device *)id->driver_data; 8712b3098b3d03 Matt Ranostay 2020-05-11 212 = 8712b3098b3d03 Matt Ranostay 2020-05-11 213 indio_dev->info =3D &atlas= _info; 8712b3098b3d03 Matt Ranostay 2020-05-11 214 indio_dev->name =3D ATLAS_= EZO_DRV_NAME; 8712b3098b3d03 Matt Ranostay 2020-05-11 215 indio_dev->channels =3D ch= ip->channels; 8712b3098b3d03 Matt Ranostay 2020-05-11 216 indio_dev->num_channels = =3D chip->num_channels; 8712b3098b3d03 Matt Ranostay 2020-05-11 217 indio_dev->modes =3D INDIO= _DIRECT_MODE; 8712b3098b3d03 Matt Ranostay 2020-05-11 218 = 8712b3098b3d03 Matt Ranostay 2020-05-11 219 data =3D iio_priv(indio_de= v); 8712b3098b3d03 Matt Ranostay 2020-05-11 220 data->client =3D client; 8712b3098b3d03 Matt Ranostay 2020-05-11 @221 data->chip =3D chip; 8712b3098b3d03 Matt Ranostay 2020-05-11 222 mutex_init(&data->lock); 8712b3098b3d03 Matt Ranostay 2020-05-11 223 = 8712b3098b3d03 Matt Ranostay 2020-05-11 224 return devm_iio_device_reg= ister(&client->dev, indio_dev); 8712b3098b3d03 Matt Ranostay 2020-05-11 225 }; 8712b3098b3d03 Matt Ranostay 2020-05-11 226 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5063528184423217525==--