Re: [PATCH] iio: light: veml6030: add support for triggered buffer

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

 



On 08/11/2024 10:41, kernel test robot wrote:
> Hi Javier,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on c9f8285ec18c08fae0de08835eb8e5953339e664]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Javier-Carrasco/iio-light-veml6030-add-support-for-triggered-buffer/20241108-042332
> base:   c9f8285ec18c08fae0de08835eb8e5953339e664
> patch link:    https://lore.kernel.org/r/20241107-veml6030_triggered_buffer-v1-1-4810ab86cc56%40gmail.com
> patch subject: [PATCH] iio: light: veml6030: add support for triggered buffer
> config: i386-randconfig-062-20241108 (https://download.01.org/0day-ci/archive/20241108/202411081703.Ft0YjqcK-lkp@xxxxxxxxx/config)
> compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241108/202411081703.Ft0YjqcK-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/202411081703.Ft0YjqcK-lkp@xxxxxxxxx/
> 
> sparse warnings: (new ones prefixed by >>)
>>> drivers/iio/light/veml6030.c:958:39: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 @@     got int [addressable] reg @@
>    drivers/iio/light/veml6030.c:958:39: sparse:     expected restricted __le16
>    drivers/iio/light/veml6030.c:958:39: sparse:     got int [addressable] reg
> 
> vim +958 drivers/iio/light/veml6030.c
> 
>    944	
>    945	static irqreturn_t veml6030_trigger_handler(int irq, void *p)
>    946	{
>    947		struct iio_poll_func *pf = p;
>    948		struct iio_dev *iio = pf->indio_dev;
>    949		struct veml6030_data *data = iio_priv(iio);
>    950		int i, ret, reg;
>    951		int j = 0;
>    952	
>    953		iio_for_each_active_channel(iio, i) {
>    954			ret = regmap_read(data->regmap, VEML6030_REG_DATA(i), &reg);
>    955			if (ret)
>    956				goto done;
>    957	
>  > 958			data->scan.chans[j++] = reg;

chans is currently declared as __le16 chans[2], but it should be u16
chans[2], as regmap already handles the endianness.

Then the direct assignment does not raise any warnings. When at it, I
will define reg as unsigned int.

>    959		}
>    960	
>    961		iio_push_to_buffers_with_timestamp(iio, &data->scan, pf->timestamp);
>    962	
>    963	done:
>    964		iio_trigger_notify_done(iio->trig);
>    965	
>    966		return IRQ_HANDLED;
>    967	}
>    968	
> 

Best regards,
Javier Carrasco




[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