From: Yu Peng Date: Thu, 30 Oct 2025 12:37:57 +0000 (+0800) Subject: x86/microcode: Mark early_parse_cmdline() as __init X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca8313fd83399ea1d18e695c2ae9b259985c9e1f;p=thirdparty%2Flinux.git x86/microcode: Mark early_parse_cmdline() as __init Fix section mismatch warning reported by modpost: .text:early_parse_cmdline() -> .init.data:boot_command_line The function early_parse_cmdline() is only called during init and accesses init data, so mark it __init to match its usage. [ bp: This happens only when the toolchain fails to inline the function and I haven't been able to reproduce it with any toolchain I'm using. Patch is obviously correct regardless. ] Signed-off-by: Yu Peng Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/all/20251030123757.1410904-1-pengyu@kylinos.cn --- diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index d7baec8ec0b49..ccc83b0bf63c8 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -136,7 +136,7 @@ bool __init microcode_loader_disabled(void) return dis_ucode_ldr; } -static void early_parse_cmdline(void) +static void __init early_parse_cmdline(void) { char cmd_buf[64] = {}; char *s, *p = cmd_buf;