Re: [PATCH 4/4] iio: dac: ad3530r: Add driver for AD3530R and AD3531R

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

 



Hi Kim,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 8dbeb413806f9f810d97d25284f585b201aa3bdc]

url:    https://github.com/intel-lab-lkp/linux/commits/Kim-Seer-Paller/iio-ABI-add-new-DAC-powerdown-mode/20250319-115119
base:   8dbeb413806f9f810d97d25284f585b201aa3bdc
patch link:    https://lore.kernel.org/r/20250319-togreg-v1-4-d8244a502f2c%40analog.com
patch subject: [PATCH 4/4] iio: dac: ad3530r: Add driver for AD3530R and AD3531R
config: alpha-randconfig-r121-20250321 (https://download.01.org/0day-ci/archive/20250321/202503210537.KxDNeihS-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 12.4.0
reproduce: (https://download.01.org/0day-ci/archive/20250321/202503210537.KxDNeihS-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/202503210537.KxDNeihS-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/iio/dac/ad3530r.c:286:17: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int reg_val @@     got restricted __be16 [usertype] @@
   drivers/iio/dac/ad3530r.c:286:17: sparse:     expected unsigned int reg_val
   drivers/iio/dac/ad3530r.c:286:17: sparse:     got restricted __be16 [usertype]
>> drivers/iio/dac/ad3530r.c:316:24: sparse: sparse: cast to restricted __be16
>> drivers/iio/dac/ad3530r.c:316:24: sparse: sparse: cast to restricted __be16
>> drivers/iio/dac/ad3530r.c:316:24: sparse: sparse: cast to restricted __be16
>> drivers/iio/dac/ad3530r.c:316:24: sparse: sparse: cast to restricted __be16
>> drivers/iio/dac/ad3530r.c:316:24: sparse: sparse: cast to restricted __be16
>> drivers/iio/dac/ad3530r.c:316:24: sparse: sparse: cast to restricted __be16
>> drivers/iio/dac/ad3530r.c:316:24: sparse: sparse: cast to restricted __be16
>> drivers/iio/dac/ad3530r.c:316:24: sparse: sparse: cast to restricted __be16

vim +286 drivers/iio/dac/ad3530r.c

   278	
   279	static int ad3530r_dac_write(struct ad3530r_state *st, unsigned int chan,
   280				     unsigned int val)
   281	{
   282		int ret;
   283		unsigned int reg_val;
   284	
   285		guard(mutex)(&st->lock);
 > 286		reg_val = cpu_to_be16(val);
   287	
   288		ret = regmap_bulk_write(st->regmap, st->chip_info->input_ch_reg(chan),
   289					&reg_val, 2);
   290		if (ret)
   291			return ret;
   292	
   293		if (st->ldac_gpio)
   294			return ad3530r_trigger_hw_ldac(st->ldac_gpio);
   295	
   296		return regmap_update_bits(st->regmap, st->chip_info->sw_ldac_trig_reg,
   297					  AD3530R_SW_LDAC_TRIG_MASK,
   298					  FIELD_PREP(AD3530R_SW_LDAC_TRIG_MASK, 1));
   299	}
   300	
   301	static int ad3530r_read_raw(struct iio_dev *indio_dev,
   302				    struct iio_chan_spec const *chan,
   303				    int *val, int *val2, long info)
   304	{
   305		struct ad3530r_state *st = iio_priv(indio_dev);
   306		int ret;
   307	
   308		switch (info) {
   309		case IIO_CHAN_INFO_RAW:
   310			ret = regmap_bulk_read(st->regmap,
   311					       st->chip_info->input_ch_reg(chan->channel),
   312					       val, 2);
   313			if (ret)
   314				return ret;
   315	
 > 316			*val = FIELD_GET(AD3530R_REG_VAL_MASK, be16_to_cpu(*val));
   317	
   318			return IIO_VAL_INT;
   319		case IIO_CHAN_INFO_SCALE:
   320			*val = st->vref_mv;
   321			*val2 = 16;
   322	
   323			return IIO_VAL_FRACTIONAL_LOG2;
   324		case IIO_CHAN_INFO_OFFSET:
   325			*val = 0;
   326	
   327			return IIO_VAL_INT;
   328		default:
   329			return -EINVAL;
   330		}
   331	}
   332	

-- 
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