Re: [PATCH v3 5/6] bus: Add Baikal-T1 APB-bus driver

From: kbuild test robot
Date: Thu May 28 2020 - 01:34:16 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-apb.c: In function 'inject_error_store':
drivers/bus/bt1-apb.c:329:3: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration]
329 | readl(apb->res);
| ^~~~~
In file included from include/linux/kobject.h:20,
from include/linux/module.h:20,
from drivers/bus/bt1-apb.c:12:
drivers/bus/bt1-apb.c: At top level:
>> drivers/bus/bt1-apb.c:338: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]
338 | 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-apb.c:338:8: note: in expansion of macro 'DEVICE_ATTR_RW'
338 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~~~
drivers/bus/bt1-apb.c:338:23: note: (near initialization for 'dev_attr_inject_error.show')
338 | 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-apb.c:338:8: note: in expansion of macro 'DEVICE_ATTR_RW'
338 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~~~
>> drivers/bus/bt1-apb.c:338: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]
338 | 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-apb.c:338:8: note: in expansion of macro 'DEVICE_ATTR_RW'
338 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~~~
drivers/bus/bt1-apb.c:338:23: note: (near initialization for 'dev_attr_inject_error.store')
338 | 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-apb.c:338:8: note: in expansion of macro 'DEVICE_ATTR_RW'
338 | static DEVICE_ATTR_RW(inject_error);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +338 drivers/bus/bt1-apb.c

317
318 static int inject_error_store(struct device *dev,
319 struct device_attribute *attr,
320 const char *data, size_t count)
321 {
322 struct bt1_apb *apb = dev_get_drvdata(dev);
323
324 /*
325 * Either dummy read from the unmapped address in the APB IO area
326 * or manually set the IRQ status.
327 */
328 if (!strncmp(data, "nodev", 5))
329 readl(apb->res);
330 else if (!strncmp(data, "irq", 3))
331 regmap_update_bits(apb->regs, APB_EHB_ISR, APB_EHB_ISR_PENDING,
332 APB_EHB_ISR_PENDING);
333 else
334 return -EINVAL;
335
336 return count;
337 }
> 338 static DEVICE_ATTR_RW(inject_error);
339

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

Attachment: .config.gz
Description: application/gzip