devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ramona Alexandra Nechita <ramona.nechita@analog.com>,
	linux-iio@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	Ramona Alexandra Nechita <ramona.nechita@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Cosmin Tanislav <cosmin.tanislav@analog.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Nuno Sa <nuno.sa@analog.com>,
	Marcelo Schmitt <marcelo.schmitt@analog.com>,
	Marius Cristea <marius.cristea@microchip.com>,
	Ivan Mikhaylov <fr0st61te@gmail.com>,
	Mike Looijmans <mike.looijmans@topic.nl>,
	Marcus Folkesson <marcus.folkesson@gmail.com>,
	Liam Beguin <liambeguin@gmail.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 3/3] drivers: iio: adc: add support for ad777x family
Date: Thu, 25 Jul 2024 08:52:08 +0800	[thread overview]
Message-ID: <202407250808.qn23hGFg-lkp@intel.com> (raw)
In-Reply-To: <20240724155517.12470-5-ramona.nechita@analog.com>

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@intel.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

  parent reply	other threads:[~2024-07-25  0:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 15:54 [PATCH v4 0/3] add support for ad777x family Ramona Alexandra Nechita
2024-07-24 15:54 ` [PATCH v4 1/3] dt-bindings: iio: adc: add a7779 doc Ramona Alexandra Nechita
2024-07-24 16:09   ` Krzysztof Kozlowski
2024-07-27 15:23   ` Jonathan Cameron
2024-07-24 15:54 ` [PATCH v4 2/3] Documentation: ABI: added filter mode doc in sysfs-bus-iio Ramona Alexandra Nechita
2024-07-24 18:19   ` kernel test robot
2024-08-13 11:04   ` Andy Shevchenko
2024-07-24 15:54 ` [PATCH v4 3/3] drivers: iio: adc: add support for ad777x family Ramona Alexandra Nechita
2024-07-24 16:14   ` Krzysztof Kozlowski
2024-07-25  6:29     ` Krzysztof Kozlowski
2024-08-13 11:06     ` Andy Shevchenko
2024-07-25  0:52   ` kernel test robot [this message]
2024-07-25  2:32   ` kernel test robot
2024-07-27 15:41   ` Jonathan Cameron
2024-09-03 14:26     ` Nechita, Ramona
2024-09-03 15:16       ` Andy Shevchenko
2024-07-29 15:31   ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202407250808.qn23hGFg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=cosmin.tanislav@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fr0st61te@gmail.com \
    --cc=jic23@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lars@metafoo.de \
    --cc=liambeguin@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt@analog.com \
    --cc=marcus.folkesson@gmail.com \
    --cc=marius.cristea@microchip.com \
    --cc=mike.looijmans@topic.nl \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ramona.nechita@analog.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).