Re: [PATCH 2/4] misc/pvpanic: Add pvpanic driver framework

From: kernel test robot
Date: Thu Oct 29 2020 - 10:49:01 EST


Hi Mihai,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on linus/master v5.10-rc1 next-20201029]
[cannot apply to linux/master]
[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/Mihai-Carabas/misc-pvpanic-preparing-for-pvpanic-driver-framework/20201029-204304
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 3650b228f83adda7e5ee532e2b90429c03f7b9ec
config: openrisc-randconfig-r001-20201029 (attached as .config)
compiler: or1k-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
# https://github.com/0day-ci/linux/commit/d8f90ef175d20a5e55607c7dafea596286bb7a64
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mihai-Carabas/misc-pvpanic-preparing-for-pvpanic-driver-framework/20201029-204304
git checkout d8f90ef175d20a5e55607c7dafea596286bb7a64
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc

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

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

drivers/misc/pvpanic/pvpanic.c:54:5: warning: no previous prototype for 'pvpanic_add_device' [-Wmissing-prototypes]
54 | int pvpanic_add_device(struct device *dev, struct resource *res)
| ^~~~~~~~~~~~~~~~~~
drivers/misc/pvpanic/pvpanic.c:81:6: warning: no previous prototype for 'pvpanic_remove_device' [-Wmissing-prototypes]
81 | void pvpanic_remove_device(void)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/misc/pvpanic/pvpanic.c: In function 'pvpanic_platform_probe':
>> drivers/misc/pvpanic/pvpanic.c:104:10: error: implicit declaration of function 'ioport_map'; did you mean 'ioremap'? [-Werror=implicit-function-declaration]
104 | base = ioport_map(res->start, resource_size(res));
| ^~~~~~~~~~
| ioremap
>> drivers/misc/pvpanic/pvpanic.c:104:8: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
104 | base = ioport_map(res->start, resource_size(res));
| ^
cc1: some warnings being treated as errors

vim +104 drivers/misc/pvpanic/pvpanic.c

87
88 static int pvpanic_platform_probe(struct platform_device *pdev)
89 {
90 struct device *dev = &pdev->dev;
91 struct resource *res;
92 void __iomem *base;
93
94 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
95 if (res) {
96 base = devm_ioremap_resource(dev, res);
97 if (IS_ERR(base))
98 return -ENODEV;
99 } else {
100 res = platform_get_resource(pdev, IORESOURCE_IO, 0);
101 if (!res)
102 return -ENODEV;
103
> 104 base = ioport_map(res->start, resource_size(res));
105 if (!base)
106 return -ENODEV;
107 pvpanic_data.is_ioport = true;
108 }
109
110 pvpanic_data.base = base;
111 atomic_notifier_chain_register(&panic_notifier_list,
112 &pvpanic_panic_nb);
113
114 return 0;
115 }
116

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

Attachment: .config.gz
Description: application/gzip