Re: [PATCH V8 2/2] iio: proximity: aw96103: Add support for aw96103/aw96105 proximity sensor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on b78b25f69a1dfa79798f684ad34707b1da10a48f]

url:    https://github.com/intel-lab-lkp/linux/commits/wangshuaijie-awinic-com/dt-bindings-iio-aw96103-Add-bindings-for-aw96103-aw96105-sensor/20240826-130421
base:   b78b25f69a1dfa79798f684ad34707b1da10a48f
patch link:    https://lore.kernel.org/r/20240823094947.3511730-3-wangshuaijie%40awinic.com
patch subject: [PATCH V8 2/2] iio: proximity: aw96103: Add support for aw96103/aw96105 proximity sensor
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20240826/202408262027.ynenF6mX-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240826/202408262027.ynenF6mX-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408262027.ynenF6mX-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/iio/proximity/aw96103.c: In function 'aw96103_i2c_probe':
>> drivers/iio/proximity/aw96103.c:806:28: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     806 |         aw96103->chip_info = i2c_get_match_data(i2c);
         |                            ^


vim +/const +806 drivers/iio/proximity/aw96103.c

   793	
   794	static int aw96103_i2c_probe(struct i2c_client *i2c)
   795	{
   796		struct iio_dev *aw_iio_dev;
   797		struct aw96103 *aw96103;
   798		int ret;
   799	
   800		aw_iio_dev = devm_iio_device_alloc(&i2c->dev, sizeof(*aw96103));
   801		if (!aw_iio_dev)
   802			return -ENOMEM;
   803	
   804		aw96103 = iio_priv(aw_iio_dev);
   805		aw96103->dev = &i2c->dev;
 > 806		aw96103->chip_info = i2c_get_match_data(i2c);
   807		aw96103->max_channels = aw96103->chip_info->num_channels;
   808	
   809		aw96103->regmap = devm_regmap_init_i2c(i2c, &aw96103_regmap_confg);
   810		if (IS_ERR(aw96103->regmap))
   811			return PTR_ERR(aw96103->regmap);
   812	
   813		ret = devm_regulator_get_enable(aw96103->dev, "vcc");
   814		if (ret < 0)
   815			return ret;
   816	
   817		ret = aw96103_read_chipid(aw96103);
   818		if (ret)
   819			return ret;
   820	
   821		ret = aw96103_sw_reset(aw96103);
   822		if (ret)
   823			return ret;
   824	
   825		ret = aw96103_wait_chip_init(aw96103);
   826		if (ret)
   827			return ret;
   828	
   829		ret = request_firmware_nowait(THIS_MODULE, true, "aw96103_0.bin",
   830					      aw96103->dev, GFP_KERNEL, aw96103,
   831					      aw96103_cfg_update);
   832		if (ret)
   833			return ret;
   834	
   835		ret = aw96103_interrupt_init(aw_iio_dev, i2c);
   836		if (ret)
   837			return ret;
   838		aw_iio_dev->modes = INDIO_DIRECT_MODE;
   839		aw_iio_dev->num_channels = aw96103->chip_info->num_channels;
   840		aw_iio_dev->channels = aw96103->chip_info->channels;
   841		aw_iio_dev->info = &iio_info;
   842		aw_iio_dev->name = aw96103->chip_info->name;
   843		aw_iio_dev->dev.parent = aw96103->dev;
   844	
   845		return devm_iio_device_register(aw96103->dev, aw_iio_dev);
   846	}
   847	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux