From: kernel test robot <lkp@intel.com>
To: Alexandru Ardelean <aardelean@baylibre.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
jic23@kernel.org, krzk+dt@kernel.org, robh@kernel.org,
lars@metafoo.de, michael.hennerich@analog.com,
gstols@baylibre.com, Alexandru Ardelean <aardelean@baylibre.com>
Subject: Re: [PATCH 7/7] iio: adc: ad7606: add support for AD7606C-{16,18} parts
Date: Mon, 19 Aug 2024 23:07:19 +0800 [thread overview]
Message-ID: <202408192209.IrTzVL49-lkp@intel.com> (raw)
In-Reply-To: <20240819064721.91494-8-aardelean@baylibre.com>
Hi Alexandru,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jic23-iio/togreg]
[cannot apply to linus/master v6.11-rc4 next-20240819]
[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/Alexandru-Ardelean/iio-adc-ad7606-add-bits-parameter-to-channels-macros/20240819-145028
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20240819064721.91494-8-aardelean%40baylibre.com
patch subject: [PATCH 7/7] iio: adc: ad7606: add support for AD7606C-{16,18} parts
config: i386-buildonly-randconfig-001-20240819 (https://download.01.org/0day-ci/archive/20240819/202408192209.IrTzVL49-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240819/202408192209.IrTzVL49-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/202408192209.IrTzVL49-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/iio/adc/ad7606.c:796:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
796 | int ret, ch;
| ^
1 warning generated.
vim +/ret +796 drivers/iio/adc/ad7606.c
94168a5789874a Alexandru Ardelean 2024-08-19 790
94168a5789874a Alexandru Ardelean 2024-08-19 791 static int ad7606_sw_mode_setup(struct iio_dev *indio_dev, unsigned int id)
b5d2c422286d62 Alexandru Ardelean 2024-08-19 792 {
36b63bb57295f7 Alexandru Ardelean 2024-08-19 793 unsigned int num_channels = indio_dev->num_channels - 1;
b5d2c422286d62 Alexandru Ardelean 2024-08-19 794 struct ad7606_state *st = iio_priv(indio_dev);
09d11fa081ef17 Alexandru Ardelean 2024-08-19 795 unsigned int *scale_avail_show, num_scales_avail_show;
09d11fa081ef17 Alexandru Ardelean 2024-08-19 @796 int ret, ch;
b5d2c422286d62 Alexandru Ardelean 2024-08-19 797
b5d2c422286d62 Alexandru Ardelean 2024-08-19 798 if (!st->bops->sw_mode_config)
b5d2c422286d62 Alexandru Ardelean 2024-08-19 799 return 0;
b5d2c422286d62 Alexandru Ardelean 2024-08-19 800
b5d2c422286d62 Alexandru Ardelean 2024-08-19 801 st->sw_mode_en = device_property_present(st->dev, "adi,sw-mode");
b5d2c422286d62 Alexandru Ardelean 2024-08-19 802 if (!st->sw_mode_en)
b5d2c422286d62 Alexandru Ardelean 2024-08-19 803 return 0;
b5d2c422286d62 Alexandru Ardelean 2024-08-19 804
09d11fa081ef17 Alexandru Ardelean 2024-08-19 805 indio_dev->info = &ad7606_info_sw_mode;
b5d2c422286d62 Alexandru Ardelean 2024-08-19 806
94168a5789874a Alexandru Ardelean 2024-08-19 807 switch (id) {
94168a5789874a Alexandru Ardelean 2024-08-19 808 case ID_AD7606C_18:
94168a5789874a Alexandru Ardelean 2024-08-19 809 num_scales_avail_show = num_channels;
94168a5789874a Alexandru Ardelean 2024-08-19 810 ret = ad7606c_sw_mode_setup_channels(indio_dev,
94168a5789874a Alexandru Ardelean 2024-08-19 811 ad7606c_18_chan_setup);
94168a5789874a Alexandru Ardelean 2024-08-19 812 break;
94168a5789874a Alexandru Ardelean 2024-08-19 813 case ID_AD7606C_16:
94168a5789874a Alexandru Ardelean 2024-08-19 814 num_scales_avail_show = num_channels;
94168a5789874a Alexandru Ardelean 2024-08-19 815 ret = ad7606c_sw_mode_setup_channels(indio_dev,
94168a5789874a Alexandru Ardelean 2024-08-19 816 ad7606c_16_chan_setup);
94168a5789874a Alexandru Ardelean 2024-08-19 817 break;
94168a5789874a Alexandru Ardelean 2024-08-19 818 default:
94168a5789874a Alexandru Ardelean 2024-08-19 819 num_scales_avail_show = 1;
94168a5789874a Alexandru Ardelean 2024-08-19 820
b5d2c422286d62 Alexandru Ardelean 2024-08-19 821 /* Scale of 0.076293 is only available in sw mode */
b5d2c422286d62 Alexandru Ardelean 2024-08-19 822 /* After reset, in software mode, ±10 V is set by default */
36b63bb57295f7 Alexandru Ardelean 2024-08-19 823 for (ch = 0; ch < num_channels; ch++) {
36b63bb57295f7 Alexandru Ardelean 2024-08-19 824 struct ad7606_chan_scale *cs = &st->chan_scales[ch];
36b63bb57295f7 Alexandru Ardelean 2024-08-19 825
36b63bb57295f7 Alexandru Ardelean 2024-08-19 826 cs->scale_avail = ad7616_sw_scale_avail;
36b63bb57295f7 Alexandru Ardelean 2024-08-19 827 cs->num_scales = ARRAY_SIZE(ad7616_sw_scale_avail);
36b63bb57295f7 Alexandru Ardelean 2024-08-19 828 cs->range = 2;
36b63bb57295f7 Alexandru Ardelean 2024-08-19 829 }
b5d2c422286d62 Alexandru Ardelean 2024-08-19 830
09d11fa081ef17 Alexandru Ardelean 2024-08-19 831 ret = st->bops->sw_mode_config(indio_dev);
94168a5789874a Alexandru Ardelean 2024-08-19 832 break;
94168a5789874a Alexandru Ardelean 2024-08-19 833 }
09d11fa081ef17 Alexandru Ardelean 2024-08-19 834
09d11fa081ef17 Alexandru Ardelean 2024-08-19 835 for (ch = 0; ch < num_channels; ch++) {
09d11fa081ef17 Alexandru Ardelean 2024-08-19 836 struct ad7606_chan_scale *cs;
09d11fa081ef17 Alexandru Ardelean 2024-08-19 837 int i;
09d11fa081ef17 Alexandru Ardelean 2024-08-19 838
09d11fa081ef17 Alexandru Ardelean 2024-08-19 839 /* AD7606C supports different scales per channel */
09d11fa081ef17 Alexandru Ardelean 2024-08-19 840 cs = &st->chan_scales[ch];
09d11fa081ef17 Alexandru Ardelean 2024-08-19 841
09d11fa081ef17 Alexandru Ardelean 2024-08-19 842 if (num_scales_avail_show == 1 && ch > 0) {
09d11fa081ef17 Alexandru Ardelean 2024-08-19 843 cs->scale_avail_show = scale_avail_show;
09d11fa081ef17 Alexandru Ardelean 2024-08-19 844 continue;
09d11fa081ef17 Alexandru Ardelean 2024-08-19 845 }
09d11fa081ef17 Alexandru Ardelean 2024-08-19 846
09d11fa081ef17 Alexandru Ardelean 2024-08-19 847 scale_avail_show = devm_kcalloc(st->dev, cs->num_scales * 2,
09d11fa081ef17 Alexandru Ardelean 2024-08-19 848 sizeof(*scale_avail_show),
09d11fa081ef17 Alexandru Ardelean 2024-08-19 849 GFP_KERNEL);
09d11fa081ef17 Alexandru Ardelean 2024-08-19 850 if (!scale_avail_show)
09d11fa081ef17 Alexandru Ardelean 2024-08-19 851 return -ENOMEM;
09d11fa081ef17 Alexandru Ardelean 2024-08-19 852
09d11fa081ef17 Alexandru Ardelean 2024-08-19 853 /* Generate a scale_avail list for showing to userspace */
09d11fa081ef17 Alexandru Ardelean 2024-08-19 854 for (i = 0; i < cs->num_scales; i++) {
09d11fa081ef17 Alexandru Ardelean 2024-08-19 855 scale_avail_show[i * 2] = 0;
09d11fa081ef17 Alexandru Ardelean 2024-08-19 856 scale_avail_show[i * 2 + 1] = cs->scale_avail[i];
09d11fa081ef17 Alexandru Ardelean 2024-08-19 857 }
09d11fa081ef17 Alexandru Ardelean 2024-08-19 858
09d11fa081ef17 Alexandru Ardelean 2024-08-19 859 cs->scale_avail_show = scale_avail_show;
09d11fa081ef17 Alexandru Ardelean 2024-08-19 860 }
09d11fa081ef17 Alexandru Ardelean 2024-08-19 861
09d11fa081ef17 Alexandru Ardelean 2024-08-19 862 return 0;
b5d2c422286d62 Alexandru Ardelean 2024-08-19 863 }
b5d2c422286d62 Alexandru Ardelean 2024-08-19 864
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-08-19 15:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 6:47 [PATCH 0/7] iio: adc: ad7606: add support for AD7606C-{16,18} parts Alexandru Ardelean
2024-08-19 6:47 ` [PATCH 1/7] iio: adc: ad7606: add 'bits' parameter to channels macros Alexandru Ardelean
2024-08-23 18:52 ` Jonathan Cameron
2024-08-27 13:53 ` Alexandru Ardelean
2024-08-19 6:47 ` [PATCH 2/7] iio: adc: ad7606: move 'val' pointer to ad7606_scan_direct() Alexandru Ardelean
2024-08-19 6:47 ` [PATCH 3/7] iio: adc: ad7606: split a 'ad7606_sw_mode_setup()' from probe Alexandru Ardelean
2024-08-19 6:47 ` [PATCH 4/7] iio: adc: ad7606: wrap channel ranges & scales into struct Alexandru Ardelean
2024-08-19 6:47 ` [PATCH 5/7] iio: adc: ad7606: rework available attributes for SW channels Alexandru Ardelean
2024-08-19 6:47 ` [PATCH 6/7] dt-bindings: iio: adc: add adi,ad7606c-{16,18} compatible strings Alexandru Ardelean
2024-08-19 13:09 ` Krzysztof Kozlowski
2024-08-20 4:51 ` Alexandru Ardelean
2024-08-21 20:26 ` Jonathan Cameron
2024-08-23 9:09 ` Krzysztof Kozlowski
2024-08-28 10:23 ` Alexandru Ardelean
2024-08-19 6:47 ` [PATCH 7/7] iio: adc: ad7606: add support for AD7606C-{16,18} parts Alexandru Ardelean
2024-08-19 15:07 ` kernel test robot [this message]
2024-08-19 15:33 ` David Lechner
2024-08-23 15:54 ` Alexandru Ardelean
2024-08-23 18:04 ` David Lechner
2024-08-23 19:19 ` Jonathan Cameron
2024-08-27 13:53 ` Alexandru Ardelean
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=202408192209.IrTzVL49-lkp@intel.com \
--to=lkp@intel.com \
--cc=aardelean@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=gstols@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=michael.hennerich@analog.com \
--cc=oe-kbuild-all@lists.linux.dev \
--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 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.