Re: [PATCH v3 4/6] bus: Add Baikal-T1 AXI-bus driver

From: kbuild test robot
Date: Wed May 27 2020 - 18:44:14 EST


Hi Serge,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on char-misc/char-misc-testing staging/staging-testing linus/master v5.7-rc7 next-20200526]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Serge-Semin/bus-memory-Add-Baikal-T1-SoC-APB-AXI-L2-drivers/20200526-210837
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc

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

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/bus/bt1-axi.c: In function 'inject_error_store':
drivers/bus/bt1-axi.c:228:3: error: implicit declaration of function 'readb' [-Werror=implicit-function-declaration]
228 | readb(axi->qos_regs);
| ^~~~~
drivers/bus/bt1-axi.c:230:3: error: implicit declaration of function 'writeb' [-Werror=implicit-function-declaration]
230 | writeb(0, axi->qos_regs);
| ^~~~~~
In file included from include/linux/kobject.h:20,
from include/linux/module.h:20,
from drivers/bus/bt1-axi.c:12:
drivers/bus/bt1-axi.c: At top level:
>> drivers/bus/bt1-axi.c:236:23: error: initialization of 'ssize_t (*)(struct device *, struct device_attribute *, char *)' {aka 'long int (*)(struct device *, struct device_attribute *, char *)'} from incompatible pointer type 'int (*)(struct device *, struct device_attribute *, char *)' [-Werror=incompatible-pointer-types]
236 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~
include/linux/sysfs.h:104:10: note: in definition of macro '__ATTR'
104 | .show = _show, | ^~~~~
>> include/linux/device.h:130:45: note: in expansion of macro '__ATTR_RW'
130 | struct device_attribute dev_attr_##_name = __ATTR_RW(_name)
| ^~~~~~~~~
>> drivers/bus/bt1-axi.c:236:8: note: in expansion of macro 'DEVICE_ATTR_RW'
236 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~~~
drivers/bus/bt1-axi.c:236:23: note: (near initialization for 'dev_attr_inject_error.show')
236 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~
include/linux/sysfs.h:104:10: note: in definition of macro '__ATTR'
104 | .show = _show, | ^~~~~
>> include/linux/device.h:130:45: note: in expansion of macro '__ATTR_RW'
130 | struct device_attribute dev_attr_##_name = __ATTR_RW(_name)
| ^~~~~~~~~
>> drivers/bus/bt1-axi.c:236:8: note: in expansion of macro 'DEVICE_ATTR_RW'
236 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~~~
>> drivers/bus/bt1-axi.c:236:23: error: initialization of 'ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t)' {aka 'long int (*)(struct device *, struct device_attribute *, const char *, long unsigned int)'} from incompatible pointer type 'int (*)(struct device *, struct device_attribute *, const char *, size_t)' {aka 'int (*)(struct device *, struct device_attribute *, const char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
236 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~
include/linux/sysfs.h:105:11: note: in definition of macro '__ATTR'
105 | .store = _store, | ^~~~~~
>> include/linux/device.h:130:45: note: in expansion of macro '__ATTR_RW'
130 | struct device_attribute dev_attr_##_name = __ATTR_RW(_name)
| ^~~~~~~~~
>> drivers/bus/bt1-axi.c:236:8: note: in expansion of macro 'DEVICE_ATTR_RW'
236 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~~~
drivers/bus/bt1-axi.c:236:23: note: (near initialization for 'dev_attr_inject_error.store')
236 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~
include/linux/sysfs.h:105:11: note: in definition of macro '__ATTR'
105 | .store = _store, | ^~~~~~
>> include/linux/device.h:130:45: note: in expansion of macro '__ATTR_RW'
130 | struct device_attribute dev_attr_##_name = __ATTR_RW(_name)
| ^~~~~~~~~
>> drivers/bus/bt1-axi.c:236:8: note: in expansion of macro 'DEVICE_ATTR_RW'
236 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +236 drivers/bus/bt1-axi.c

215
216 static int inject_error_store(struct device *dev,
217 struct device_attribute *attr,
218 const char *data, size_t count)
219 {
220 struct bt1_axi *axi = dev_get_drvdata(dev);
221
222 /*
223 * Performing unaligned read from the memory will cause the CM2 bus
224 * error while unaligned writing - the AXI bus write error handled
225 * by this driver.
226 */
227 if (!strncmp(data, "bus", 3))
228 readb(axi->qos_regs);
229 else if (!strncmp(data, "unaligned", 9))
230 writeb(0, axi->qos_regs);
231 else
232 return -EINVAL;
233
234 return count;
235 }
> 236 static DEVICE_ATTR_RW(inject_error);
237

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

Attachment: .config.gz
Description: application/gzip