Content-Type: multipart/mixed; boundary="===============5538102236869873795==" 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: Thu, 03 Feb 2022 23:48:58 +0800 Message-ID: <202202032354.wewk3q69-lkp@intel.com> In-Reply-To: <20220203122543.75814-1-andriy.shevchenko@linux.intel.com> List-Id: --===============5538102236869873795== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Andy, I love your patch! Perhaps something to improve: [auto build test WARNING on jic23-iio/togreg] [also build test WARNING 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: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220203/= 202202032354.wewk3q69-lkp(a)intel.com/config) compiler: arceb-elf-gcc (GCC) 11.2.0 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=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Darc SHELL=3D/bin/bash drivers/iio/chemical/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/iio/chemical/atlas-ezo-sensor.c:183:28: warning: initialization = of 'long unsigned int' from 'struct atlas_ezo_device *' makes integer from = pointer without a cast [-Wint-conversion] 183 | { "atlas-co2-ezo", &atlas_ezo_devices[0] }, | ^ drivers/iio/chemical/atlas-ezo-sensor.c:183:28: note: (near initializati= on for 'atlas_ezo_id[0].driver_data') drivers/iio/chemical/atlas-ezo-sensor.c:184:27: warning: initialization = of 'long unsigned int' from 'struct atlas_ezo_device *' makes integer from = pointer without a cast [-Wint-conversion] 184 | { "atlas-o2-ezo", &atlas_ezo_devices[1] }, | ^ drivers/iio/chemical/atlas-ezo-sensor.c:184:27: note: (near initializati= on for 'atlas_ezo_id[1].driver_data') drivers/iio/chemical/atlas-ezo-sensor.c:185:28: warning: initialization = of 'long unsigned int' from 'struct atlas_ezo_device *' makes integer from = pointer without a cast [-Wint-conversion] 185 | { "atlas-hum-ezo", &atlas_ezo_devices[2] }, | ^ drivers/iio/chemical/atlas-ezo-sensor.c:185:28: note: (near initializati= on for 'atlas_ezo_id[2].driver_data') drivers/iio/chemical/atlas-ezo-sensor.c: In function 'atlas_ezo_probe': >> drivers/iio/chemical/atlas-ezo-sensor.c:221:20: warning: assignment disc= ards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 221 | data->chip =3D chip; | ^ vim +183 drivers/iio/chemical/atlas-ezo-sensor.c 181 = 182 static const struct i2c_device_id atlas_ezo_id[] =3D { > 183 { "atlas-co2-ezo", &atlas_ezo_devices[0] }, > 184 { "atlas-o2-ezo", &atlas_ezo_devices[1] }, 185 { "atlas-hum-ezo", &atlas_ezo_devices[2] }, 186 {} 187 }; 188 MODULE_DEVICE_TABLE(i2c, atlas_ezo_id); 189 = 190 static const struct of_device_id atlas_ezo_dt_ids[] =3D { 191 { .compatible =3D "atlas,co2-ezo", .data =3D &atlas_ezo_devices[0],= }, 192 { .compatible =3D "atlas,o2-ezo", .data =3D &atlas_ezo_devices[1], = }, 193 { .compatible =3D "atlas,hum-ezo", .data =3D &atlas_ezo_devices[2],= }, 194 {} 195 }; 196 MODULE_DEVICE_TABLE(of, atlas_ezo_dt_ids); 197 = 198 static int atlas_ezo_probe(struct i2c_client *client, 199 const struct i2c_device_id *id) 200 { 201 const struct atlas_ezo_device *chip; 202 struct atlas_ezo_data *data; 203 struct iio_dev *indio_dev; 204 = 205 indio_dev =3D devm_iio_device_alloc(&client->dev, sizeof(*data)); 206 if (!indio_dev) 207 return -ENOMEM; 208 = 209 chip =3D device_get_match_data(&client->dev); 210 if (!chip) 211 chip =3D (const struct atlas_ezo_device *)id->driver_data; 212 = 213 indio_dev->info =3D &atlas_info; 214 indio_dev->name =3D ATLAS_EZO_DRV_NAME; 215 indio_dev->channels =3D chip->channels; 216 indio_dev->num_channels =3D chip->num_channels; 217 indio_dev->modes =3D INDIO_DIRECT_MODE; 218 = 219 data =3D iio_priv(indio_dev); 220 data->client =3D client; > 221 data->chip =3D chip; 222 mutex_init(&data->lock); 223 = 224 return devm_iio_device_register(&client->dev, indio_dev); 225 }; 226 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5538102236869873795==--