Re: [PATCH v1 2/2] iio: accel: Add driver support for ADXL355

From: kernel test robot
Date: Wed Jul 21 2021 - 10:14:58 EST


Hi Puranjay,

I love your patch! Yet something to improve:

[auto build test ERROR on iio/togreg]
[also build test ERROR on robh/for-next linus/master v5.14-rc2 next-20210721]
[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/Puranjay-Mohan/iio-accel-add-support-for-ADXL355/20210721-180632
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/1abb9f2f7fa2b5ed06f84a705806b1b907532bfa
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Puranjay-Mohan/iio-accel-add-support-for-ADXL355/20210721-180632
git checkout 1abb9f2f7fa2b5ed06f84a705806b1b907532bfa
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/iio/accel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/iio/accel/adxl355_core.c:19:34: error: static declaration of 'adxl355_read_reg_range' follows non-static declaration
19 | static const struct regmap_range adxl355_read_reg_range[] = {
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/iio/accel/adxl355_core.c:17:
drivers/iio/accel/adxl355.h:73:34: note: previous declaration of 'adxl355_read_reg_range' was here
73 | extern const struct regmap_range adxl355_read_reg_range[];
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/accel/adxl355_core.c:30:34: error: static declaration of 'adxl355_write_reg_range' follows non-static declaration
30 | static const struct regmap_range adxl355_write_reg_range[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/iio/accel/adxl355_core.c:17:
drivers/iio/accel/adxl355.h:77:34: note: previous declaration of 'adxl355_write_reg_range' was here
77 | extern const struct regmap_range adxl355_write_reg_range[];
| ^~~~~~~~~~~~~~~~~~~~~~~


vim +/adxl355_read_reg_range +19 drivers/iio/accel/adxl355_core.c

18
> 19 static const struct regmap_range adxl355_read_reg_range[] = {
20 regmap_reg_range(ADXL355_DEVID_AD, ADXL355_FIFO_DATA),
21 regmap_reg_range(ADXL355_OFFSET_X_H, ADXL355_SELF_TEST)
22 };
23
24 const struct regmap_access_table adxl355_readable_regs_tbl = {
25 .yes_ranges = adxl355_read_reg_range,
26 .n_yes_ranges = ARRAY_SIZE(adxl355_read_reg_range),
27 };
28 EXPORT_SYMBOL_GPL(adxl355_readable_regs_tbl);
29
> 30 static const struct regmap_range adxl355_write_reg_range[] = {
31 regmap_reg_range(ADXL355_OFFSET_X_H, ADXL355_RESET)
32 };
33

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip