From: kernel test robot <lkp@intel.com>
To: "Pop Ioan Daniel" <pop.ioan-daniel@analog.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Sergiu Cuciurean" <sergiu.cuciurean@analog.com>,
"Dragos Bogdan" <dragos.bogdan@analog.com>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Olivier Moysan" <olivier.moysan@foss.st.com>,
"Javier Carrasco" <javier.carrasco.cruz@gmail.com>,
"Matti Vaittinen" <matti.vaittinen@fi.rohmeurope.com>,
"Matti Vaittinen" <mazziesaccount@gmail.com>,
"Tobias Sperling" <tobias.sperling@softing.com>,
"Marcelo Schmitt" <marcelo.schmitt@analog.com>,
"Alisa-Dariana Roman" <alisadariana@gmail.com>,
"Ramona Alexandra Nechita" <ramona.nechita@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v2 1/4] iio: backend: update iio_backend_oversampling_ratio_set
Date: Sat, 10 May 2025 02:03:05 +0800 [thread overview]
Message-ID: <202505100131.FZe7C8ot-lkp@intel.com> (raw)
In-Reply-To: <20250508123107.3797042-2-pop.ioan-daniel@analog.com>
Hi Pop,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.15-rc5 next-20250509]
[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/Pop-Ioan-Daniel/iio-backend-update-iio_backend_oversampling_ratio_set/20250508-203339
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20250508123107.3797042-2-pop.ioan-daniel%40analog.com
patch subject: [PATCH v2 1/4] iio: backend: update iio_backend_oversampling_ratio_set
config: i386-randconfig-061-20250509 (https://download.01.org/0day-ci/archive/20250510/202505100131.FZe7C8ot-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250510/202505100131.FZe7C8ot-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/202505100131.FZe7C8ot-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/adc/ad4851.c:324:60: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int chan @@ got struct iio_chan_spec const *chan @@
drivers/iio/adc/ad4851.c:324:60: sparse: expected unsigned int chan
drivers/iio/adc/ad4851.c:324:60: sparse: got struct iio_chan_spec const *chan
vim +324 drivers/iio/adc/ad4851.c
295
296 static int ad4851_set_oversampling_ratio(struct iio_dev *indio_dev,
297 const struct iio_chan_spec *chan,
298 unsigned int osr)
299 {
300 struct ad4851_state *st = iio_priv(indio_dev);
301 int val, ret;
302
303 guard(mutex)(&st->lock);
304
305 if (osr == 1) {
306 ret = regmap_clear_bits(st->regmap, AD4851_REG_OVERSAMPLE,
307 AD4851_OS_EN_MSK);
308 if (ret)
309 return ret;
310 } else {
311 val = ad4851_osr_to_regval(osr);
312 if (val < 0)
313 return -EINVAL;
314
315 ret = regmap_update_bits(st->regmap, AD4851_REG_OVERSAMPLE,
316 AD4851_OS_EN_MSK |
317 AD4851_OS_RATIO_MSK,
318 FIELD_PREP(AD4851_OS_EN_MSK, 1) |
319 FIELD_PREP(AD4851_OS_RATIO_MSK, val));
320 if (ret)
321 return ret;
322 }
323
> 324 ret = iio_backend_oversampling_ratio_set(st->back, chan, osr);
325 if (ret)
326 return ret;
327
328 switch (st->info->resolution) {
329 case 20:
330 switch (osr) {
331 case 0:
332 return -EINVAL;
333 case 1:
334 val = 20;
335 break;
336 default:
337 val = 24;
338 break;
339 }
340 break;
341 case 16:
342 val = 16;
343 break;
344 default:
345 return -EINVAL;
346 }
347
348 ret = iio_backend_data_size_set(st->back, val);
349 if (ret)
350 return ret;
351
352 if (osr == 1 || st->info->resolution == 16) {
353 ret = regmap_clear_bits(st->regmap, AD4851_REG_PACKET,
354 AD4851_PACKET_FORMAT_MASK);
355 if (ret)
356 return ret;
357
358 st->resolution_boost_enabled = false;
359 } else {
360 ret = regmap_update_bits(st->regmap, AD4851_REG_PACKET,
361 AD4851_PACKET_FORMAT_MASK,
362 FIELD_PREP(AD4851_PACKET_FORMAT_MASK, 1));
363 if (ret)
364 return ret;
365
366 st->resolution_boost_enabled = true;
367 }
368
369 if (st->osr != osr) {
370 ret = ad4851_scale_fill(indio_dev);
371 if (ret)
372 return ret;
373
374 st->osr = osr;
375 }
376
377 return 0;
378 }
379
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-05-09 18:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 12:30 [PATCH v2 0/4] Add support for AD7405/ADUM770x Pop Ioan Daniel
2025-05-08 12:30 ` [PATCH v2 1/4] iio: backend: update iio_backend_oversampling_ratio_set Pop Ioan Daniel
2025-05-08 16:41 ` David Lechner
2025-05-09 10:10 ` kernel test robot
2025-05-09 10:21 ` kernel test robot
2025-05-09 18:03 ` kernel test robot [this message]
2025-05-08 12:30 ` [PATCH v2 2/4] iio: adc: adi-axi-adc: add set decimation rate Pop Ioan Daniel
2025-05-08 16:45 ` David Lechner
2025-05-08 12:30 ` [PATCH v2 3/4] dt-bindings: iio: adc: add ad7405 Pop Ioan Daniel
2025-05-08 14:41 ` Conor Dooley
2025-05-09 13:45 ` Rob Herring (Arm)
2025-05-08 12:30 ` [PATCH v2 4/4] iio: adc: ad7405: add ad7405 driver Pop Ioan Daniel
2025-05-08 17:08 ` David Lechner
2025-05-11 14:45 ` Jonathan Cameron
2025-05-09 11:45 ` kernel test robot
2025-05-11 15:02 ` Jonathan Cameron
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=202505100131.FZe7C8ot-lkp@intel.com \
--to=lkp@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=alisadariana@gmail.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=dragos.bogdan@analog.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=nuno.sa@analog.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=olivier.moysan@foss.st.com \
--cc=pop.ioan-daniel@analog.com \
--cc=ramona.nechita@analog.com \
--cc=robh@kernel.org \
--cc=sergiu.cuciurean@analog.com \
--cc=tobias.sperling@softing.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.