* [linux-next:master 1359/2564] include/linux/device/driver.h:290:1: error: type defaults to 'int' in declaration of 'device_initcall'
@ 2020-10-29 21:08 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-10-29 21:08 UTC (permalink / raw)
To: Dong Aisheng
Cc: kbuild-all, Linux Memory Management List, Shawn Guo, Stephen Boyd
[-- Attachment #1: Type: text/plain, Size: 5829 bytes --]
Hi Dong,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3f267ec60b922eff2a5c90d532357a39f155b730
commit: 77d8f3068c63ee0983f0b5ba3207d3f7cce11be4 [1359/2564] clk: imx: scu: add two cells binding support
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=77d8f3068c63ee0983f0b5ba3207d3f7cce11be4
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 77d8f3068c63ee0983f0b5ba3207d3f7cce11be4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/device.h:32,
from include/linux/of_platform.h:9,
from drivers/clk/imx/clk-scu.c:11:
include/linux/device/driver.h:290:1: warning: data definition has no type or storage class
290 | device_initcall(__driver##_init);
| ^~~~~~~~~~~~~~~
include/linux/platform_device.h:258:2: note: in expansion of macro 'builtin_driver'
258 | builtin_driver(__platform_driver, platform_driver_register)
| ^~~~~~~~~~~~~~
drivers/clk/imx/clk-scu.c:477:1: note: in expansion of macro 'builtin_platform_driver'
477 | builtin_platform_driver(imx_clk_scu_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/device/driver.h:290:1: error: type defaults to 'int' in declaration of 'device_initcall' [-Werror=implicit-int]
290 | device_initcall(__driver##_init);
| ^~~~~~~~~~~~~~~
include/linux/platform_device.h:258:2: note: in expansion of macro 'builtin_driver'
258 | builtin_driver(__platform_driver, platform_driver_register)
| ^~~~~~~~~~~~~~
drivers/clk/imx/clk-scu.c:477:1: note: in expansion of macro 'builtin_platform_driver'
477 | builtin_platform_driver(imx_clk_scu_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/imx/clk-scu.c:477:1: warning: parameter names (without types) in function declaration
In file included from include/linux/device.h:32,
from include/linux/of_platform.h:9,
from drivers/clk/imx/clk-scu.c:11:
drivers/clk/imx/clk-scu.c:477:25: warning: 'imx_clk_scu_driver_init' defined but not used [-Wunused-function]
477 | builtin_platform_driver(imx_clk_scu_driver);
| ^~~~~~~~~~~~~~~~~~
include/linux/device/driver.h:286:19: note: in definition of macro 'builtin_driver'
286 | static int __init __driver##_init(void) \
| ^~~~~~~~
drivers/clk/imx/clk-scu.c:477:1: note: in expansion of macro 'builtin_platform_driver'
477 | builtin_platform_driver(imx_clk_scu_driver);
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +290 include/linux/device/driver.h
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 269
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 270 /**
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 271 * builtin_driver() - Helper macro for drivers that don't do anything
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 272 * special in init and have no exit. This eliminates some boilerplate.
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 273 * Each driver may only use this macro once, and calling it replaces
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 274 * device_initcall (or in some cases, the legacy __initcall). This is
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 275 * meant to be a direct parallel of module_driver() above but without
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 276 * the __exit stuff that is not used for builtin cases.
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 277 *
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 278 * @__driver: driver name
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 279 * @__register: register function for this driver type
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 280 * @...: Additional arguments to be passed to __register
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 281 *
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 282 * Use this macro to construct bus specific macros for registering
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 283 * drivers, and do not use it on its own.
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 284 */
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 285 #define builtin_driver(__driver, __register, ...) \
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 286 static int __init __driver##_init(void) \
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 287 { \
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 288 return __register(&(__driver) , ##__VA_ARGS__); \
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 289 } \
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 @290 device_initcall(__driver##_init);
4c002c978b7f2f2 Greg Kroah-Hartman 2019-12-09 291
:::::: The code at line 290 was first introduced by commit
:::::: 4c002c978b7f2f2306d53de051c054504af920a9 device.h: move 'struct driver' stuff out to device/driver.h
:::::: TO: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 77501 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-29 21:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 21:08 [linux-next:master 1359/2564] include/linux/device/driver.h:290:1: error: type defaults to 'int' in declaration of 'device_initcall' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox