]> Git Repo - J-linux.git/commitdiff
x86/boot: Mark prepare_command_line() __init
authorBorislav Petkov <[email protected]>
Tue, 23 Nov 2021 07:04:34 +0000 (08:04 +0100)
committerPeter Zijlstra <[email protected]>
Wed, 24 Nov 2021 11:20:24 +0000 (12:20 +0100)
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]
arch/x86/kernel/setup.c

index c410be738ae78e072330f56f8a2b03d519e9616c..6a190c7f4d71b05fe1dc9a476424a647999eeb82 100644 (file)
@@ -742,7 +742,7 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
        return 0;
 }
 
-static char *prepare_command_line(void)
+static char * __init prepare_command_line(void)
 {
 #ifdef CONFIG_CMDLINE_BOOL
 #ifdef CONFIG_CMDLINE_OVERRIDE
This page took 0.050711 seconds and 4 git commands to generate.