* [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
@ 2026-05-18 7:13 Andy Shevchenko
2026-05-18 7:17 ` Andy Shevchenko
2026-05-18 17:32 ` kernel test robot
0 siblings, 2 replies; 6+ messages in thread
From: Andy Shevchenko @ 2026-05-18 7:13 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, linux-iio, linux-kernel
Cc: Nuno Sá, Andy Shevchenko, Andy Shevchenko
Currently IIO_CHAN_SOFT_TIMESTAMP() can only be used to fill the static
data. In some cases it would be convenient to use it as right value in
the assignment operation. But it can't be done as is, because compiler
has no clue about the data layout. Converting it to be a compound literal
allows the above mentioned usage.
While at it, tidy up the indentation.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v0: to be incorporated into David's series
include/linux/iio/iio.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 96b05c86c325..711c00f67371 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -353,15 +353,15 @@ static inline bool iio_channel_has_available(const struct iio_chan_spec *chan,
(chan->info_mask_shared_by_all_available & BIT(type));
}
-#define IIO_CHAN_SOFT_TIMESTAMP(_si) { \
+#define IIO_CHAN_SOFT_TIMESTAMP(_si) (struct iio_chan_spec) { \
.type = IIO_TIMESTAMP, \
.channel = -1, \
.scan_index = _si, \
.scan_type = { \
.sign = 's', \
- .realbits = 64, \
+ .realbits = 64, \
.storagebits = 64, \
- }, \
+ }, \
}
s64 iio_get_time_ns(const struct iio_dev *indio_dev);
--
2.50.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
2026-05-18 7:13 [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal Andy Shevchenko
@ 2026-05-18 7:17 ` Andy Shevchenko
2026-05-18 17:32 ` kernel test robot
1 sibling, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2026-05-18 7:17 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, linux-iio, linux-kernel
Cc: Nuno Sá, Andy Shevchenko
On Mon, May 18, 2026 at 09:13:29AM +0200, Andy Shevchenko wrote:
> Currently IIO_CHAN_SOFT_TIMESTAMP() can only be used to fill the static
> data. In some cases it would be convenient to use it as right value in
> the assignment operation. But it can't be done as is, because compiler
> has no clue about the data layout. Converting it to be a compound literal
> allows the above mentioned usage.
>
> While at it, tidy up the indentation.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>
> v0: to be incorporated into David's series
Also may require to amend the drivers (at the same time) that use it inline
drivers/iio/adc/ad7606.c:1478
drivers/iio/adc/max11410.c:807
to avoid potential compilation issues.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
2026-05-18 7:13 [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal Andy Shevchenko
2026-05-18 7:17 ` Andy Shevchenko
@ 2026-05-18 17:32 ` kernel test robot
2026-05-18 18:17 ` Andy Shevchenko
1 sibling, 1 reply; 6+ messages in thread
From: kernel test robot @ 2026-05-18 17:32 UTC (permalink / raw)
To: Andy Shevchenko, Jonathan Cameron, David Lechner, linux-iio,
linux-kernel
Cc: oe-kbuild-all, Nuno Sá, Andy Shevchenko
Hi Andy,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v7.1-rc4 next-20260518]
[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/Andy-Shevchenko/iio-Convert-IIO_CHAN_SOFT_TIMESTAMP-to-be-compound-literal/20260518-151541
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20260518071349.469748-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
config: sparc64-randconfig-r132-20260518 (https://download.01.org/0day-ci/archive/20260519/202605190130.oWitiRzG-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260519/202605190130.oWitiRzG-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/202605190130.oWitiRzG-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/adc/max11410.c:807:31: sparse: sparse: cast to non-scalar
>> drivers/iio/adc/max11410.c:807:31: sparse: sparse: cast from non-scalar
vim +807 drivers/iio/adc/max11410.c
a44ef7c4609724e Ibrahim Tilki 2022-10-03 691
a44ef7c4609724e Ibrahim Tilki 2022-10-03 692 static int max11410_parse_channels(struct max11410_state *st,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 693 struct iio_dev *indio_dev)
a44ef7c4609724e Ibrahim Tilki 2022-10-03 694 {
a44ef7c4609724e Ibrahim Tilki 2022-10-03 695 struct iio_chan_spec chanspec = chanspec_template;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 696 struct device *dev = &st->spi_dev->dev;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 697 struct max11410_channel_config *cfg;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 698 struct iio_chan_spec *channels;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 699 u32 reference, sig_path;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 700 const char *node_name;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 701 u32 inputs[2], scale;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 702 unsigned int num_ch;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 703 int chan_idx = 0;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 704 int ret, i;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 705
a44ef7c4609724e Ibrahim Tilki 2022-10-03 706 num_ch = device_get_child_node_count(dev);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 707 if (num_ch == 0)
a44ef7c4609724e Ibrahim Tilki 2022-10-03 708 return dev_err_probe(&indio_dev->dev, -ENODEV,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 709 "FW has no channels defined\n");
a44ef7c4609724e Ibrahim Tilki 2022-10-03 710
a44ef7c4609724e Ibrahim Tilki 2022-10-03 711 /* Reserve space for soft timestamp channel */
a44ef7c4609724e Ibrahim Tilki 2022-10-03 712 num_ch++;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 713 channels = devm_kcalloc(dev, num_ch, sizeof(*channels), GFP_KERNEL);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 714 if (!channels)
a44ef7c4609724e Ibrahim Tilki 2022-10-03 715 return -ENOMEM;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 716
a44ef7c4609724e Ibrahim Tilki 2022-10-03 717 st->channels = devm_kcalloc(dev, num_ch, sizeof(*st->channels),
a44ef7c4609724e Ibrahim Tilki 2022-10-03 718 GFP_KERNEL);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 719 if (!st->channels)
a44ef7c4609724e Ibrahim Tilki 2022-10-03 720 return -ENOMEM;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 721
1693d2a7459183d Jonathan Cameron 2024-02-17 722 device_for_each_child_node_scoped(dev, child) {
a44ef7c4609724e Ibrahim Tilki 2022-10-03 723 node_name = fwnode_get_name(child);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 724 if (fwnode_property_present(child, "diff-channels")) {
a44ef7c4609724e Ibrahim Tilki 2022-10-03 725 ret = fwnode_property_read_u32_array(child,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 726 "diff-channels",
a44ef7c4609724e Ibrahim Tilki 2022-10-03 727 inputs,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 728 ARRAY_SIZE(inputs));
a44ef7c4609724e Ibrahim Tilki 2022-10-03 729
a44ef7c4609724e Ibrahim Tilki 2022-10-03 730 chanspec.differential = 1;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 731 } else {
a44ef7c4609724e Ibrahim Tilki 2022-10-03 732 ret = fwnode_property_read_u32(child, "reg", &inputs[0]);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 733
a44ef7c4609724e Ibrahim Tilki 2022-10-03 734 inputs[1] = 0;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 735 chanspec.differential = 0;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 736 }
1693d2a7459183d Jonathan Cameron 2024-02-17 737 if (ret)
a44ef7c4609724e Ibrahim Tilki 2022-10-03 738 return ret;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 739
a44ef7c4609724e Ibrahim Tilki 2022-10-03 740 if (inputs[0] > MAX11410_CHANNEL_INDEX_MAX ||
1693d2a7459183d Jonathan Cameron 2024-02-17 741 inputs[1] > MAX11410_CHANNEL_INDEX_MAX)
a44ef7c4609724e Ibrahim Tilki 2022-10-03 742 return dev_err_probe(&indio_dev->dev, -EINVAL,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 743 "Invalid channel index for %s, should be less than %d\n",
a44ef7c4609724e Ibrahim Tilki 2022-10-03 744 node_name,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 745 MAX11410_CHANNEL_INDEX_MAX + 1);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 746
a44ef7c4609724e Ibrahim Tilki 2022-10-03 747 cfg = &st->channels[chan_idx];
a44ef7c4609724e Ibrahim Tilki 2022-10-03 748
a44ef7c4609724e Ibrahim Tilki 2022-10-03 749 reference = MAX11410_REFSEL_AVDD_AGND;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 750 fwnode_property_read_u32(child, "adi,reference", &reference);
1693d2a7459183d Jonathan Cameron 2024-02-17 751 if (reference > MAX11410_REFSEL_MAX)
a44ef7c4609724e Ibrahim Tilki 2022-10-03 752 return dev_err_probe(&indio_dev->dev, -EINVAL,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 753 "Invalid adi,reference value for %s, should be less than %d.\n",
a44ef7c4609724e Ibrahim Tilki 2022-10-03 754 node_name, MAX11410_REFSEL_MAX + 1);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 755
a44ef7c4609724e Ibrahim Tilki 2022-10-03 756 if (!max11410_get_vrefp(st, reference) ||
1693d2a7459183d Jonathan Cameron 2024-02-17 757 (!max11410_get_vrefn(st, reference) && reference <= 2))
a44ef7c4609724e Ibrahim Tilki 2022-10-03 758 return dev_err_probe(&indio_dev->dev, -EINVAL,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 759 "Invalid VREF configuration for %s, either specify corresponding VREF regulators or change adi,reference property.\n",
a44ef7c4609724e Ibrahim Tilki 2022-10-03 760 node_name);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 761
a44ef7c4609724e Ibrahim Tilki 2022-10-03 762 sig_path = MAX11410_PGA_SIG_PATH_BUFFERED;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 763 fwnode_property_read_u32(child, "adi,input-mode", &sig_path);
1693d2a7459183d Jonathan Cameron 2024-02-17 764 if (sig_path > MAX11410_SIG_PATH_MAX)
a44ef7c4609724e Ibrahim Tilki 2022-10-03 765 return dev_err_probe(&indio_dev->dev, -EINVAL,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 766 "Invalid adi,input-mode value for %s, should be less than %d.\n",
a44ef7c4609724e Ibrahim Tilki 2022-10-03 767 node_name, MAX11410_SIG_PATH_MAX + 1);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 768
a44ef7c4609724e Ibrahim Tilki 2022-10-03 769 fwnode_property_read_u32(child, "settling-time-us",
a44ef7c4609724e Ibrahim Tilki 2022-10-03 770 &cfg->settling_time_us);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 771 cfg->bipolar = fwnode_property_read_bool(child, "bipolar");
a44ef7c4609724e Ibrahim Tilki 2022-10-03 772 cfg->buffered_vrefp = fwnode_property_read_bool(child, "adi,buffered-vrefp");
a44ef7c4609724e Ibrahim Tilki 2022-10-03 773 cfg->buffered_vrefn = fwnode_property_read_bool(child, "adi,buffered-vrefn");
a44ef7c4609724e Ibrahim Tilki 2022-10-03 774 cfg->refsel = reference;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 775 cfg->sig_path = sig_path;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 776 cfg->gain = 0;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 777
a44ef7c4609724e Ibrahim Tilki 2022-10-03 778 /* Enable scale_available property if input mode is PGA */
a44ef7c4609724e Ibrahim Tilki 2022-10-03 779 if (sig_path == MAX11410_PGA_SIG_PATH_PGA) {
a44ef7c4609724e Ibrahim Tilki 2022-10-03 780 __set_bit(IIO_CHAN_INFO_SCALE,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 781 &chanspec.info_mask_separate_available);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 782 cfg->scale_avail = devm_kcalloc(dev, MAX11410_SCALE_AVAIL_SIZE * 2,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 783 sizeof(*cfg->scale_avail),
a44ef7c4609724e Ibrahim Tilki 2022-10-03 784 GFP_KERNEL);
1693d2a7459183d Jonathan Cameron 2024-02-17 785 if (!cfg->scale_avail)
a44ef7c4609724e Ibrahim Tilki 2022-10-03 786 return -ENOMEM;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 787
a44ef7c4609724e Ibrahim Tilki 2022-10-03 788 scale = max11410_get_scale(st, *cfg);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 789 for (i = 0; i < MAX11410_SCALE_AVAIL_SIZE; i++) {
a44ef7c4609724e Ibrahim Tilki 2022-10-03 790 cfg->scale_avail[2 * i] = scale >> i;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 791 cfg->scale_avail[2 * i + 1] = chanspec.scan_type.realbits;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 792 }
a44ef7c4609724e Ibrahim Tilki 2022-10-03 793 } else {
a44ef7c4609724e Ibrahim Tilki 2022-10-03 794 __clear_bit(IIO_CHAN_INFO_SCALE,
a44ef7c4609724e Ibrahim Tilki 2022-10-03 795 &chanspec.info_mask_separate_available);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 796 }
a44ef7c4609724e Ibrahim Tilki 2022-10-03 797
a44ef7c4609724e Ibrahim Tilki 2022-10-03 798 chanspec.address = chan_idx;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 799 chanspec.scan_index = chan_idx;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 800 chanspec.channel = inputs[0];
a44ef7c4609724e Ibrahim Tilki 2022-10-03 801 chanspec.channel2 = inputs[1];
a44ef7c4609724e Ibrahim Tilki 2022-10-03 802
a44ef7c4609724e Ibrahim Tilki 2022-10-03 803 channels[chan_idx] = chanspec;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 804 chan_idx++;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 805 }
a44ef7c4609724e Ibrahim Tilki 2022-10-03 806
a44ef7c4609724e Ibrahim Tilki 2022-10-03 @807 channels[chan_idx] = (struct iio_chan_spec)IIO_CHAN_SOFT_TIMESTAMP(chan_idx);
a44ef7c4609724e Ibrahim Tilki 2022-10-03 808
a44ef7c4609724e Ibrahim Tilki 2022-10-03 809 indio_dev->num_channels = chan_idx + 1;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 810 indio_dev->channels = channels;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 811
a44ef7c4609724e Ibrahim Tilki 2022-10-03 812 return 0;
a44ef7c4609724e Ibrahim Tilki 2022-10-03 813 }
a44ef7c4609724e Ibrahim Tilki 2022-10-03 814
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
2026-05-18 17:32 ` kernel test robot
@ 2026-05-18 18:17 ` Andy Shevchenko
2026-05-19 7:59 ` David Laight
0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2026-05-18 18:17 UTC (permalink / raw)
To: kernel test robot
Cc: Jonathan Cameron, David Lechner, linux-iio, linux-kernel,
oe-kbuild-all, Nuno Sá, Andy Shevchenko
On Tue, May 19, 2026 at 01:32:51AM +0800, kernel test robot wrote:
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on jic23-iio/togreg]
> [also build test WARNING on linus/master v7.1-rc4 next-20260518]
> [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/Andy-Shevchenko/iio-Convert-IIO_CHAN_SOFT_TIMESTAMP-to-be-compound-literal/20260518-151541
> base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> patch link: https://lore.kernel.org/r/20260518071349.469748-1-andriy.shevchenko%40linux.intel.com
> patch subject: [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
> config: sparc64-randconfig-r132-20260518 (https://download.01.org/0day-ci/archive/20260519/202605190130.oWitiRzG-lkp@intel.com/config)
> compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260519/202605190130.oWitiRzG-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/202605190130.oWitiRzG-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> >> drivers/iio/adc/max11410.c:807:31: sparse: sparse: cast to non-scalar
> >> drivers/iio/adc/max11410.c:807:31: sparse: sparse: cast from non-scalar
Thanks, the sparks were expected exactly in this and one more driver.
I mentioned that in my reply to my own patch already.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
2026-05-18 18:17 ` Andy Shevchenko
@ 2026-05-19 7:59 ` David Laight
2026-05-19 12:30 ` Andy Shevchenko
0 siblings, 1 reply; 6+ messages in thread
From: David Laight @ 2026-05-19 7:59 UTC (permalink / raw)
To: Andy Shevchenko
Cc: kernel test robot, Jonathan Cameron, David Lechner, linux-iio,
linux-kernel, oe-kbuild-all, Nuno Sá, Andy Shevchenko
On Mon, 18 May 2026 21:17:38 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> On Tue, May 19, 2026 at 01:32:51AM +0800, kernel test robot wrote:
>
> > kernel test robot noticed the following build warnings:
> >
> > [auto build test WARNING on jic23-iio/togreg]
> > [also build test WARNING on linus/master v7.1-rc4 next-20260518]
> > [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/Andy-Shevchenko/iio-Convert-IIO_CHAN_SOFT_TIMESTAMP-to-be-compound-literal/20260518-151541
> > base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> > patch link: https://lore.kernel.org/r/20260518071349.469748-1-andriy.shevchenko%40linux.intel.com
> > patch subject: [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
> > config: sparc64-randconfig-r132-20260518 (https://download.01.org/0day-ci/archive/20260519/202605190130.oWitiRzG-lkp@intel.com/config)
> > compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
> > sparse: v0.6.5-rc1
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260519/202605190130.oWitiRzG-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/202605190130.oWitiRzG-lkp@intel.com/
> >
> > sparse warnings: (new ones prefixed by >>)
> > >> drivers/iio/adc/max11410.c:807:31: sparse: sparse: cast to non-scalar
> > >> drivers/iio/adc/max11410.c:807:31: sparse: sparse: cast from non-scalar
>
> Thanks, the sparks were expected exactly in this and one more driver.
> I mentioned that in my reply to my own patch already.
>
Can you just remove then cast from:
a44ef7c4609724e Ibrahim Tilki 2022-10-03 @807 \
channels[chan_idx] = (struct iio_chan_spec)IIO_CHAN_SOFT_TIMESTAMP(chan_idx);
since it is no longer needed?
-- David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
2026-05-19 7:59 ` David Laight
@ 2026-05-19 12:30 ` Andy Shevchenko
0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2026-05-19 12:30 UTC (permalink / raw)
To: David Laight
Cc: kernel test robot, Jonathan Cameron, David Lechner, linux-iio,
linux-kernel, oe-kbuild-all, Nuno Sá, Andy Shevchenko
On Tue, May 19, 2026 at 08:59:02AM +0100, David Laight wrote:
> On Mon, 18 May 2026 21:17:38 +0300
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> > On Tue, May 19, 2026 at 01:32:51AM +0800, kernel test robot wrote:
> >
> > > kernel test robot noticed the following build warnings:
> > >
> > > [auto build test WARNING on jic23-iio/togreg]
> > > [also build test WARNING on linus/master v7.1-rc4 next-20260518]
> > > [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/Andy-Shevchenko/iio-Convert-IIO_CHAN_SOFT_TIMESTAMP-to-be-compound-literal/20260518-151541
> > > base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> > > patch link: https://lore.kernel.org/r/20260518071349.469748-1-andriy.shevchenko%40linux.intel.com
> > > patch subject: [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal
> > > config: sparc64-randconfig-r132-20260518 (https://download.01.org/0day-ci/archive/20260519/202605190130.oWitiRzG-lkp@intel.com/config)
> > > compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
> > > sparse: v0.6.5-rc1
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260519/202605190130.oWitiRzG-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/202605190130.oWitiRzG-lkp@intel.com/
> > >
> > > sparse warnings: (new ones prefixed by >>)
> > > >> drivers/iio/adc/max11410.c:807:31: sparse: sparse: cast to non-scalar
> > > >> drivers/iio/adc/max11410.c:807:31: sparse: sparse: cast from non-scalar
> >
> > Thanks, the sparks were expected exactly in this and one more driver.
> > I mentioned that in my reply to my own patch already.
> >
>
> Can you just remove then cast from:
Not a cast! :-)
> a44ef7c4609724e Ibrahim Tilki 2022-10-03 @807 \
> channels[chan_idx] = (struct iio_chan_spec)IIO_CHAN_SOFT_TIMESTAMP(chan_idx);
> since it is no longer needed?
I won't have time, if you can wait a couple of weeks (my vacations started,
I am busy with something else). Otherwise, feel free to drop those from the
two drivers in the same patch, thanks!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-19 12:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-18 7:13 [PATCH v0 1/1] iio: Convert IIO_CHAN_SOFT_TIMESTAMP() to be compound literal Andy Shevchenko
2026-05-18 7:17 ` Andy Shevchenko
2026-05-18 17:32 ` kernel test robot
2026-05-18 18:17 ` Andy Shevchenko
2026-05-19 7:59 ` David Laight
2026-05-19 12:30 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox