modpost add more symbols to whitelist pattern2
PATCH 3/4 modpost add more symbols to whitelist pattern2
o MODPOST generates warning for i386 if compiled with CONFIG_RELOCATABLE=y and serial console support is enabled.
o Serial console setup function, serial8250_console_setup(), is a non __init function and it calls functions which are of type __init(). (uart_parse_options() and uart_set_options()). Assuming, setup will be called during init time, changing serial8250_console_setup() to __init.
o Adding one more pattern to modpost whitelist. Console drivers might have *_console structures containing references to setup functions which can be of __init type. Don't generate warnings for those.
WARNING: vmlinux - Section mismatch: reference to .init.text: from .data between 'serial8250_console' (at offset 0xc05a33d8) and 'serial8250_reg'
---
drivers/serial/8250.c | 2 +- scripts/mod/modpost.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/serial/8250.c renamed from drivers/serial/8250.c~modpost-add-more-symbols-to-whitelist-pattern +1 -1
@@ -2296,7 +2296,7 @@ serial8250_console_write(struct consolelocal_irq_restore (flags); } -static int serial8250_console_setup (struct console *co,char *options) +static int __init serial8250_console_setup (struct console *co,char *options) {struct uart_port *port;int baud =9600 ;
scripts/mod/modpost.c renamed from scripts/mod/modpost.c~modpost-add-more-symbols-to-whitelist-pattern +1 -0
@@ -595,6 +595,7 @@ static int secref_whitelist(const char *"_ops" ,"_probe" ,"_probe_one" , +"_console" , NULL };
_