drivers/pmdomain/imx/gpc.c:554:1: error: function definition is not allowed here
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm.git fixes head: 29030cd58b1e7e788728bc5bf4ae3c44881b7bbc commit: d7262971a2acc2a835d8727d6833a6f764f56124 [1/3] pmdomain: imx: gpc: remove all initialized power domains config: arm-randconfig-1003-20261110 (https://download.01.org/0day-ci/archive/20261111/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project e73e336290028f26553b46c9fba844c13da38c9c) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261111/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> drivers/pmdomain/imx/gpc.c:554:1: error: function definition is not allowed here
554 | builtin_platform_driver(imx_gpc_driver)
| ^
include/linux/platform_device.h:345:2: note: expanded from macro 'builtin_platform_driver'
345 | builtin_driver(__platform_driver, platform_driver_register)
| ^
include/linux/device/driver.h:294:41: note: expanded from macro 'builtin_driver'
294 | static int __init __driver##_init(void) \
| ^
>> drivers/pmdomain/imx/gpc.c:554:1: error: use of undeclared identifier 'imx_gpc_driver_init'; did you mean 'imx_gpc_driver'?
554 | builtin_platform_driver(imx_gpc_driver)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:345:2: note: expanded from macro 'builtin_platform_driver'
345 | builtin_driver(__platform_driver, platform_driver_register)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device/driver.h:298:17: note: expanded from macro 'builtin_driver'
298 | device_initcall(__driver##_init);
| ^~~~~~~~~~~~~~~
<scratch space>:189:1: note: expanded from here
189 | imx_gpc_driver_init
| ^~~~~~~~~~~~~~~~~~~
drivers/pmdomain/imx/gpc.c:546:31: note: 'imx_gpc_driver' declared here
546 | static struct platform_driver imx_gpc_driver = {
| ^
>> drivers/pmdomain/imx/gpc.c:554:1: error: initializing 'initcall_t' (aka 'int (*)(void)') with an expression of incompatible type 'struct platform_driver'
554 | builtin_platform_driver(imx_gpc_driver)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:345:2: note: expanded from macro 'builtin_platform_driver'
345 | builtin_driver(__platform_driver, platform_driver_register)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device/driver.h:297:3: note: expanded from macro 'builtin_driver'
297 | } \
| ^
298 | device_initcall(__driver##_init);
| ~~~~~~~~~~~~~~~
include/linux/init.h:306:30: note: expanded from macro '\
device_initcall'
306 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^ ~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
15 | #define ___PASTE(a, b) a##b
| ^
<scratch space>:4:1: note: expanded from here
4 | __initcall__kmod_gpc__483_554_imx_gpc_driver_init6
| ^
include/linux/init.h:264:20: note: expanded from macro '____define_initcall'
264 | static initcall_t __name __used \
| ^
265 | __attribute__((__section__(__sec))) = fn;
| ~~
>> drivers/pmdomain/imx/gpc.c:554:40: error: expected '}'
554 | builtin_platform_driver(imx_gpc_driver)
| ^
drivers/pmdomain/imx/gpc.c:504:1: note: to match this '{'
504 | {
| ^4 errors generated.
vim +554 drivers/pmdomain/imx/gpc.c
721cabf6c6600d drivers/soc/imx/gpc.c Lucas Stach 2017-02-17 545
721cabf6c6600d drivers/soc/imx/gpc.c Lucas Stach 2017-02-17 @546 static struct platform_driver imx_gpc_driver = {
721cabf6c6600d drivers/soc/imx/gpc.c Lucas Stach 2017-02-17 547 .driver = {
721cabf6c6600d drivers/soc/imx/gpc.c Lucas Stach 2017-02-17 548 .name = "imx-gpc",
721cabf6c6600d drivers/soc/imx/gpc.c Lucas Stach 2017-02-17 549 .of_match_table = imx_gpc_dt_ids,
721cabf6c6600d drivers/soc/imx/gpc.c Lucas Stach 2017-02-17 550 },
721cabf6c6600d drivers/soc/imx/gpc.c Lucas Stach 2017-02-17 551 .probe = imx_gpc_probe,
e70140ba0d2b1a drivers/pmdomain/imx/gpc.c Linus Torvalds 2024-12-01 552 .remove = imx_gpc_remove,
721cabf6c6600d drivers/soc/imx/gpc.c Lucas Stach 2017-02-17 553 };
721cabf6c6600d drivers/soc/imx/gpc.c Lucas Stach 2017-02-17 @554 builtin_platform_driver(imx_gpc_driver):::::: The code at line 554 was first introduced by commit
:::::: 721cabf6c6600dbe689ee2782bc087270e97e652 soc: imx: move PGC handling to a new GPC driver
:::::: TO: Lucas Stach <[email protected]>
:::::: CC: Shawn Guo <[email protected]>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki