Re: [PATCH v3 6/6] iio: adc: Add support for AD4000

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

 



Hi Marcelo,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-spi/for-next]
[also build test WARNING on jic23-iio/togreg linus/master v6.10-rc2 next-20240605]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Marcelo-Schmitt/spi-Add-SPI-mode-bit-for-MOSI-idle-state-configuration/20240605-231912
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
patch link:    https://lore.kernel.org/r/e340f48324b0ea3afb1c715cb2fba184c27112a1.1717539384.git.marcelo.schmitt%40analog.com
patch subject: [PATCH v3 6/6] iio: adc: Add support for AD4000
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240606/202406060440.I43MwC4B-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240606/202406060440.I43MwC4B-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/202406060440.I43MwC4B-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/iio/adc/ad4000.c: In function 'ad4000_single_conversion':
>> drivers/iio/adc/ad4000.c:375:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     375 |         int ret;
         |             ^~~


vim +/ret +375 drivers/iio/adc/ad4000.c

   369	
   370	static int ad4000_single_conversion(struct iio_dev *indio_dev,
   371					    const struct iio_chan_spec *chan, int *val)
   372	{
   373		struct ad4000_state *st = iio_priv(indio_dev);
   374		u32 sample;
 > 375		int ret;
   376	
   377		ret = ad4000_convert_and_acquire(st);
   378	
   379		if (chan->scan_type.storagebits > 16)
   380			sample = be32_to_cpu(st->scan.data.sample_buf32);
   381		else
   382			sample = be16_to_cpu(st->scan.data.sample_buf16);
   383	
   384		switch (chan->scan_type.realbits) {
   385		case 16:
   386			break;
   387		case 18:
   388			sample = FIELD_GET(AD4000_18BIT_MSK, sample);
   389			break;
   390		case 20:
   391			sample = FIELD_GET(AD4000_20BIT_MSK, sample);
   392			break;
   393		default:
   394			return -EINVAL;
   395		}
   396	
   397		if (chan->scan_type.sign == 's')
   398			*val = sign_extend32(sample, chan->scan_type.realbits - 1);
   399	
   400		return IIO_VAL_INT;
   401	}
   402	

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