Re: [PATCH v2 2/2] iio: light: Add support for TI OPT4060 color sensor

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

 



Hi Per-Daniel,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 0c559323bbaabee7346c12e74b497e283aaafef5]

url:    https://github.com/intel-lab-lkp/linux/commits/Per-Daniel-Olsson/dt-bindings-iio-light-Document-TI-OPT4060-RGBW-sensor/20241006-005244
base:   0c559323bbaabee7346c12e74b497e283aaafef5
patch link:    https://lore.kernel.org/r/20241005165119.3549472-3-perdaniel.olsson%40axis.com
patch subject: [PATCH v2 2/2] iio: light: Add support for TI OPT4060 color sensor
config: csky-randconfig-r122-20241007 (https://download.01.org/0day-ci/archive/20241007/202410072240.s3wGb17S-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20241007/202410072240.s3wGb17S-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/202410072240.s3wGb17S-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/iio/light/opt4060.c:963:9: sparse: sparse: dereference of noderef expression
>> drivers/iio/light/opt4060.c:963:9: sparse: sparse: dereference of noderef expression
>> drivers/iio/light/opt4060.c:963:9: sparse: sparse: dereference of noderef expression

vim +963 drivers/iio/light/opt4060.c

   951	
   952	static irqreturn_t opt4060_trigger_handler(int irq, void *p)
   953	{
   954		struct iio_poll_func *pf = p;
   955		struct iio_dev *idev = pf->indio_dev;
   956		struct opt4060_chip *chip = iio_priv(idev);
   957		struct opt4060_buffer raw;
   958		int ret, chan;
   959		int i = 0;
   960	
   961		memset(&raw, 0, sizeof(raw));
   962	
 > 963		for_each_set_bit(chan, idev->active_scan_mask, idev->masklength) {
   964			ret = opt4060_read_raw_value(chip,
   965						     opt4060_channels[chan].address,
   966						     &raw.chan[i++]);
   967			if (ret) {
   968				dev_err(chip->dev, "Reading raw channel data failed\n");
   969				goto err_read;
   970			}
   971		}
   972	
   973		iio_push_to_buffers_with_timestamp(idev, &raw, pf->timestamp);
   974	err_read:
   975		iio_trigger_notify_done(idev->trig);
   976		return IRQ_HANDLED;
   977	}
   978	

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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux