[jirislaby:devel 46/48] include/linux/module.h:131:49: error: redefinition of '__inittest'
From: kernel test robot
Date: Mon Apr 11 2022 - 15:47:00 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: c196e3b15cddb539135de6a3c6bcf32b89213b4c
commit: cb7e9edf8651c8c3a50dcba57659fac27bf30e3d [46/48] tty: serial: allow COMPILE_TEST for some drivers
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20220412/202204120330.GKLJmA9r-lkp@xxxxxxxxx/config)
compiler: mips-linux-gcc (GCC) 11.2.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/jirislaby/linux.git/commit/?id=cb7e9edf8651c8c3a50dcba57659fac27bf30e3d
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout cb7e9edf8651c8c3a50dcba57659fac27bf30e3d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash drivers/tty/serial/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from include/linux/device/driver.h:21,
from include/linux/device.h:32,
from include/linux/platform_device.h:13,
from drivers/tty/serial/pic32_uart.c:12:
>> include/linux/module.h:131:49: error: redefinition of '__inittest'
131 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
include/linux/module.h:112:41: note: in expansion of macro 'module_init'
112 | #define core_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/tty/serial/pic32_uart.c:782:1: note: in expansion of macro 'core_initcall'
782 | core_initcall(pic32_late_console_init);
| ^~~~~~~~~~~~~
include/linux/module.h:131:49: note: previous definition of '__inittest' with type 'int (*(void))(void)'
131 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
include/linux/module.h:127:41: note: in expansion of macro 'module_init'
127 | #define console_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/tty/serial/pic32_uart.c:769:1: note: in expansion of macro 'console_initcall'
769 | console_initcall(pic32_console_init);
| ^~~~~~~~~~~~~~~~
>> include/linux/module.h:133:13: error: redefinition of 'init_module'
133 | int init_module(void) __copy(initfn) \
| ^~~~~~~~~~~
include/linux/module.h:112:41: note: in expansion of macro 'module_init'
112 | #define core_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/tty/serial/pic32_uart.c:782:1: note: in expansion of macro 'core_initcall'
782 | core_initcall(pic32_late_console_init);
| ^~~~~~~~~~~~~
include/linux/module.h:133:13: note: previous definition of 'init_module' with type 'int(void)'
133 | int init_module(void) __copy(initfn) \
| ^~~~~~~~~~~
include/linux/module.h:127:41: note: in expansion of macro 'module_init'
127 | #define console_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/tty/serial/pic32_uart.c:769:1: note: in expansion of macro 'console_initcall'
769 | console_initcall(pic32_console_init);
| ^~~~~~~~~~~~~~~~
>> include/linux/module.h:131:49: error: redefinition of '__inittest'
131 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
include/linux/module.h:116:41: note: in expansion of macro 'module_init'
116 | #define arch_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/tty/serial/pic32_uart.c:939:1: note: in expansion of macro 'arch_initcall'
939 | arch_initcall(pic32_uart_init);
| ^~~~~~~~~~~~~
include/linux/module.h:131:49: note: previous definition of '__inittest' with type 'int (*(void))(void)'
131 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
include/linux/module.h:112:41: note: in expansion of macro 'module_init'
112 | #define core_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/tty/serial/pic32_uart.c:782:1: note: in expansion of macro 'core_initcall'
782 | core_initcall(pic32_late_console_init);
| ^~~~~~~~~~~~~
>> include/linux/module.h:133:13: error: redefinition of 'init_module'
133 | int init_module(void) __copy(initfn) \
| ^~~~~~~~~~~
include/linux/module.h:116:41: note: in expansion of macro 'module_init'
116 | #define arch_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/tty/serial/pic32_uart.c:939:1: note: in expansion of macro 'arch_initcall'
939 | arch_initcall(pic32_uart_init);
| ^~~~~~~~~~~~~
include/linux/module.h:133:13: note: previous definition of 'init_module' with type 'int(void)'
133 | int init_module(void) __copy(initfn) \
| ^~~~~~~~~~~
include/linux/module.h:127:41: note: in expansion of macro 'module_init'
127 | #define console_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/tty/serial/pic32_uart.c:769:1: note: in expansion of macro 'console_initcall'
769 | console_initcall(pic32_console_init);
| ^~~~~~~~~~~~~~~~
vim +/__inittest +131 include/linux/module.h
0fd972a7d91d6e Paul Gortmaker 2015-05-01 128
0fd972a7d91d6e Paul Gortmaker 2015-05-01 129 /* Each module must use one module_init(). */
0fd972a7d91d6e Paul Gortmaker 2015-05-01 130 #define module_init(initfn) \
1f318a8bafcfba Arnd Bergmann 2017-02-01 @131 static inline initcall_t __maybe_unused __inittest(void) \
0fd972a7d91d6e Paul Gortmaker 2015-05-01 132 { return initfn; } \
cf68fffb66d60d Sami Tolvanen 2021-04-08 @133 int init_module(void) __copy(initfn) \
cf68fffb66d60d Sami Tolvanen 2021-04-08 134 __attribute__((alias(#initfn))); \
cf68fffb66d60d Sami Tolvanen 2021-04-08 135 __CFI_ADDRESSABLE(init_module, __initdata);
0fd972a7d91d6e Paul Gortmaker 2015-05-01 136
:::::: The code at line 131 was first introduced by commit
:::::: 1f318a8bafcfba9f0d623f4870c4e890fd22e659 modules: mark __inittest/__exittest as __maybe_unused
:::::: TO: Arnd Bergmann <arnd@xxxxxxxx>
:::::: CC: Jessica Yu <jeyu@xxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://01.org/lkp