[PATCH v4] arch/x86/microcode: Mark early_parse_cmdline() as __init

From: Yu Peng

Date: Thu Oct 30 2025 - 08:38:03 EST


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.

Signed-off-by: Yu Peng <pengyu@xxxxxxxxxx>
---
arch/x86/kernel/cpu/microcode/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Changes in v4:
- Resend to fix broken mail thread (v3 was not sent as a reply).

Changes in v3:
- Fix Signed-off-by email address.

Changes in v2:
- Resend to add correct email.
- No code changes.

diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index d7baec8ec0b4..ccc83b0bf63c 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;
--
2.43.0