Skip to content

Commit c0f2077

Browse files
suryasaimadhuPeter Zijlstra
authored andcommitted
x86/boot: Mark prepare_command_line() __init
Fix: WARNING: modpost: vmlinux.o(.text.unlikely+0x64d0): Section mismatch in reference \ from the function prepare_command_line() to the variable .init.data:command_line The function prepare_command_line() references the variable __initdata command_line. This is often because prepare_command_line lacks a __initdata annotation or the annotation of command_line is wrong. Apparently some toolchains do different inlining decisions. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 1360572 commit c0f2077

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
742742
return 0;
743743
}
744744

745-
static char *prepare_command_line(void)
745+
static char * __init prepare_command_line(void)
746746
{
747747
#ifdef CONFIG_CMDLINE_BOOL
748748
#ifdef CONFIG_CMDLINE_OVERRIDE

0 commit comments

Comments
 (0)