Re: [PATCH v6 2/2] iio: adc: ad7173: add AD7173 driver
From: kernel test robot
Date: Fri Nov 24 2023 - 04:49:24 EST
Hi mitrutzceclan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.7-rc2 next-20231124]
[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/mitrutzceclan/iio-adc-ad7173-add-AD7173-driver/20231123-233012
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20231123152331.5751-2-user%40HYB-hhAwRlzzMZb
patch subject: [PATCH v6 2/2] iio: adc: ad7173: add AD7173 driver
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231124/202311241251.qDeS0ZtB-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231124/202311241251.qDeS0ZtB-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311241251.qDeS0ZtB-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> drivers/iio/adc/ad7173.c:329:22: warning: variable 'offset' set but not used [-Wunused-but-set-variable]
ptrdiff_t cmp_size, offset;
^
1 warning generated.
vim +/offset +329 drivers/iio/adc/ad7173.c
324
325 static struct ad7173_channel_config *
326 ad7173_find_live_config(struct ad7173_state *st, struct ad7173_channel_config *cfg)
327 {
328 struct ad7173_channel_config *cfg_aux;
> 329 ptrdiff_t cmp_size, offset;
330 int i;
331
332 offset = offsetofend(struct ad7173_channel_config, live);
333 cmp_size = sizeof_field(struct ad7173_channel_config, config_props);
334
335 for (i = 0; i < st->num_channels; i++) {
336 cfg_aux = &st->channels[i].cfg;
337
338 if (cfg_aux->live &&
339 !memcmp(&cfg->bipolar, &cfg_aux->bipolar, cmp_size))
340 return cfg_aux;
341 }
342 return NULL;
343 }
344
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki