[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBhJVJDTlw2Y8owu@gmail.com>
Date: Mon, 5 May 2025 07:15:00 +0200
From: Ingo Molnar <mingo@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: linux-tip-commits@...r.kernel.org,
"Borislav Petkov (AMD)" <bp@...en8.de>, stable@...nel.org,
x86@...nel.org
Subject: [PATCH] x86/microcode: Add microcode_loader_disabled() storage class
for the !CONFIG_MICROCODE case
Fix this build bug:
./arch/x86/include/asm/microcode.h:27:13: warning: no previous prototype for ‘microcode_loader_disabled’ [-Wmissing-prototypes]
by adding the 'static' storage class to the !CONFIG_MICROCODE
prototype.
Also, while at it, add all the other storage classes as well for this
block of prototypes, 'extern' and 'static', respectively.
( Omitting 'extern' just because it's technically not needed
is a bad habit for header prototypes and leads to bugs like
this one. )
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/include/asm/microcode.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h
index 6aa12aecbc95..c23849246d0a 100644
--- a/arch/x86/include/asm/microcode.h
+++ b/arch/x86/include/asm/microcode.h
@@ -16,15 +16,15 @@ struct ucode_cpu_info {
};
#ifdef CONFIG_MICROCODE
-void load_ucode_bsp(void);
-void load_ucode_ap(void);
-void microcode_bsp_resume(void);
-bool __init microcode_loader_disabled(void);
+extern void load_ucode_bsp(void);
+extern void load_ucode_ap(void);
+extern void microcode_bsp_resume(void);
+extern bool __init microcode_loader_disabled(void);
#else
static inline void load_ucode_bsp(void) { }
static inline void load_ucode_ap(void) { }
static inline void microcode_bsp_resume(void) { }
-bool __init microcode_loader_disabled(void) { return false; }
+static inline bool __init microcode_loader_disabled(void) { return false; }
#endif
extern unsigned long initrd_start_early;
Powered by blists - more mailing lists