[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202407250808.qn23hGFg-lkp@intel.com>
Date: Thu, 25 Jul 2024 08:52:08 +0800
From: kernel test robot <lkp@...el.com>
To: Ramona Alexandra Nechita <ramona.nechita@...log.com>,
linux-iio@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev,
Ramona Alexandra Nechita <ramona.nechita@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Cosmin Tanislav <cosmin.tanislav@...log.com>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Nuno Sa <nuno.sa@...log.com>,
Marcelo Schmitt <marcelo.schmitt@...log.com>,
Marius Cristea <marius.cristea@...rochip.com>,
Ivan Mikhaylov <fr0st61te@...il.com>,
Mike Looijmans <mike.looijmans@...ic.nl>,
Marcus Folkesson <marcus.folkesson@...il.com>,
Liam Beguin <liambeguin@...il.com>, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH v4 3/3] drivers: iio: adc: add support for ad777x family
Hi Ramona,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.10 next-20240724]
[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/Ramona-Alexandra-Nechita/dt-bindings-iio-adc-add-a7779-doc/20240725-000001
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20240724155517.12470-5-ramona.nechita%40analog.com
patch subject: [PATCH v4 3/3] drivers: iio: adc: add support for ad777x family
config: xtensa-allyesconfig (https://download.01.org/0day-ci/archive/20240725/202407250808.qn23hGFg-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240725/202407250808.qn23hGFg-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407250808.qn23hGFg-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/iio/adc/ad7779.c: In function 'ad7779_get_calibbias':
>> drivers/iio/adc/ad7779.c:420:22: warning: unused variable 'high' [-Wunused-variable]
420 | u8 low, mid, high;
| ^~~~
>> drivers/iio/adc/ad7779.c:420:17: warning: unused variable 'mid' [-Wunused-variable]
420 | u8 low, mid, high;
| ^~~
>> drivers/iio/adc/ad7779.c:420:12: warning: unused variable 'low' [-Wunused-variable]
420 | u8 low, mid, high;
| ^~~
drivers/iio/adc/ad7779.c: In function 'ad7779_set_calibbias':
>> drivers/iio/adc/ad7779.c:445:22: warning: variable 'lsb' set but not used [-Wunused-but-set-variable]
445 | u8 msb, mid, lsb;
| ^~~
>> drivers/iio/adc/ad7779.c:445:17: warning: variable 'mid' set but not used [-Wunused-but-set-variable]
445 | u8 msb, mid, lsb;
| ^~~
>> drivers/iio/adc/ad7779.c:445:12: warning: variable 'msb' set but not used [-Wunused-but-set-variable]
445 | u8 msb, mid, lsb;
| ^~~
drivers/iio/adc/ad7779.c: In function 'ad7779_read_raw':
>> drivers/iio/adc/ad7779.c:475:13: warning: unused variable 'ret' [-Wunused-variable]
475 | int ret;
| ^~~
vim +/high +420 drivers/iio/adc/ad7779.c
415
416 static int ad7779_get_calibbias(struct ad7779_state *st, int channel)
417 {
418 int ret;
419 u8 calibbias[3];
> 420 u8 low, mid, high;
421
422 ret = ad7779_spi_read(st, AD7779_REG_CH_OFFSET_LOWER_BYTE(channel),
423 &calibbias[0]);
424 if (ret)
425 return ret;
426
427 ret = ad7779_spi_read(st, AD7779_REG_CH_OFFSET_MID_BYTE(channel),
428 &calibbias[1]);
429 if (ret)
430 return ret;
431
432 ret = ad7779_spi_read(st,
433 AD7779_REG_CH_OFFSET_UPPER_BYTE(channel),
434 &calibbias[2]);
435 if (ret)
436 return ret;
437
438 return get_unaligned_be24(calibbias);
439 }
440
441 static int ad7779_set_calibbias(struct ad7779_state *st, int channel, int val)
442 {
443 int ret;
444 u8 calibbias[3];
> 445 u8 msb, mid, lsb;
446
447 msb = FIELD_GET(AD7779_UPPER, val);
448 mid = FIELD_GET(AD7779_MID, val);
449 lsb = FIELD_GET(AD7779_LOWER, val);
450 put_unaligned_be24(val, calibbias);
451 ret = ad7779_spi_write(st,
452 AD7779_REG_CH_OFFSET_UPPER_BYTE(channel),
453 calibbias[0]);
454 if (ret)
455 return ret;
456
457 ret = ad7779_spi_write(st,
458 AD7779_REG_CH_OFFSET_MID_BYTE(channel),
459 calibbias[1]);
460 if (ret)
461 return ret;
462
463 return ad7779_spi_write(st,
464 AD7779_REG_CH_OFFSET_LOWER_BYTE(channel),
465 calibbias[2]);
466 }
467
468 static int ad7779_read_raw(struct iio_dev *indio_dev,
469 struct iio_chan_spec const *chan,
470 int *val,
471 int *val2,
472 long mask)
473 {
474 struct ad7779_state *st = iio_priv(indio_dev);
> 475 int ret;
476
477 iio_device_claim_direct_scoped(return -EBUSY, indio_dev) {
478 switch (mask) {
479 case IIO_CHAN_INFO_CALIBSCALE:
480 *val = ad7779_get_calibscale(st, chan->channel);
481 iio_device_release_direct_mode(indio_dev);
482 if (*val < 0)
483 return -EINVAL;
484 *val2 = GAIN_REL;
485 return IIO_VAL_FRACTIONAL;
486 case IIO_CHAN_INFO_CALIBBIAS:
487 *val = ad7779_get_calibbias(st, chan->channel);
488 iio_device_release_direct_mode(indio_dev);
489 if (*val < 0)
490 return -EINVAL;
491 return IIO_VAL_INT;
492 case IIO_CHAN_INFO_SAMP_FREQ:
493 *val = st->sampling_freq;
494 iio_device_release_direct_mode(indio_dev);
495 if (*val < 0)
496 return -EINVAL;
497 return IIO_VAL_INT;
498 }
499 return -EINVAL;
500 }
501 unreachable();
502 }
503
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists