Re: [PATCH v1 1/8] iio: accel: adxl345: Convert to use dev_err_probe()

From: kernel test robot
Date: Mon Feb 21 2022 - 20:55:55 EST


Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on v5.17-rc5 next-20220217]
[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/Andy-Shevchenko/iio-accel-adxl345-Convert-to-use-dev_err_probe/20220222-073422
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: i386-randconfig-a014-20220221 (https://download.01.org/0day-ci/archive/20220222/202202220906.kb1l5tzA-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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/078715303e0289150d8a286c885fd2b493e36a22
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/iio-accel-adxl345-Convert-to-use-dev_err_probe/20220222-073422
git checkout 078715303e0289150d8a286c885fd2b493e36a22
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 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/adxl345_i2c.c:32:25: error: use of undeclared identifier 'spi'
return dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error initializing regmap\n");
^
1 error generated.


vim +/spi +32 drivers/iio/accel/adxl345_i2c.c

21
22 static int adxl345_i2c_probe(struct i2c_client *client,
23 const struct i2c_device_id *id)
24 {
25 struct regmap *regmap;
26
27 if (!id)
28 return -ENODEV;
29
30 regmap = devm_regmap_init_i2c(client, &adxl345_i2c_regmap_config);
31 if (IS_ERR(regmap))
> 32 return dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error initializing regmap\n");
33
34 return adxl345_core_probe(&client->dev, regmap, id->driver_data,
35 id->name);
36 }
37

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