Hi Cristian,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on next-20220112]
[cannot apply to v5.16]
[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]
url:
https://github.com/0day-ci/linux/commits/Cristian-Pop/dt-bindings-iio-add...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: i386-allyesconfig
(
https://download.01.org/0day-ci/archive/20220113/202201130058.u8Hmc486-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/d68b55a2493d868d6464f86ba93ff0926...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Cristian-Pop/dt-bindings-iio-addac-one-bit-adc-dac-yaml-documentation/20220111-194908
git checkout d68b55a2493d868d6464f86ba93ff092613cae76
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/vmwgfx/
drivers/iio/addac/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/iio/addac/one-bit-adc-dac.c: In function
'one_bit_adc_dac_set_channel_label':
> drivers/iio/addac/one-bit-adc-dac.c:115:24: warning: variable
'chan' set but not used [-Wunused-but-set-variable]
115 | struct
iio_chan_spec *chan;
| ^~~~
vim +/chan +115 drivers/iio/addac/one-bit-adc-dac.c
106
107 static int one_bit_adc_dac_set_channel_label(struct iio_dev *indio_dev,
108 struct iio_chan_spec *channels,
109 int num_channels)
110 {
111 struct device *device = indio_dev->dev.parent;
112 struct one_bit_adc_dac_state *st = iio_priv(indio_dev);
113 struct fwnode_handle *fwnode;
114 struct fwnode_handle *child;
115 struct iio_chan_spec *chan;
116 const char *label;
117 int crt_ch = 0, child_num, i = 0;
118
119 fwnode = dev_fwnode(device);
120 child_num = device_get_child_node_count(device);
121
122 st->labels = devm_kzalloc(device, sizeof(*st->labels) * child_num,
GFP_KERNEL);
123 if (!st->labels)
124 return -ENOMEM;
125
126 i = child_num;
127 fwnode_for_each_child_node(fwnode, child) {
128 if (fwnode_property_read_u32(child, "reg", &crt_ch))
129 continue;
130
131 if (crt_ch >= num_channels)
132 continue;
133
134 if (fwnode_property_read_string(child, "label", &label))
135 continue;
136
137 chan = &channels[crt_ch];
138 st->labels[--i] = label;
139 }
140
141 return 0;
142 }
143
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org