Skip to content

Commit 82c881b

Browse files
valdisksuryasaimadhu
authored andcommitted
x86/microcode/AMD: Make stub function static inline
When building with C=1 W=1 (and when CONFIG_MICROCODE_AMD=n, as Luc Van Oostenryck correctly points out) both sparse and gcc complain: CHECK arch/x86/kernel/cpu/microcode/core.c ./arch/x86/include/asm/microcode_amd.h:56:6: warning: symbol \ 'reload_ucode_amd' was not declared. Should it be static? CC arch/x86/kernel/cpu/microcode/core.o In file included from arch/x86/kernel/cpu/microcode/core.c:36: ./arch/x86/include/asm/microcode_amd.h:56:6: warning: no previous \ prototype for 'reload_ucode_amd' [-Wmissing-prototypes] 56 | void reload_ucode_amd(void) {} | ^~~~~~~~~~~~~~~~ And they're right - that function can be a static inline like its brethren. Signed-off-by: Valdis Klētnieks <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: Luc Van Oostenryck <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/52170.1575603873@turing-police
1 parent e42617b commit 82c881b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/include/asm/microcode_amd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ static inline void __init load_ucode_amd_bsp(unsigned int family) {}
5353
static inline void load_ucode_amd_ap(unsigned int family) {}
5454
static inline int __init
5555
save_microcode_in_initrd_amd(unsigned int family) { return -EINVAL; }
56-
void reload_ucode_amd(void) {}
56+
static inline void reload_ucode_amd(void) {}
5757
#endif
5858
#endif /* _ASM_X86_MICROCODE_AMD_H */

0 commit comments

Comments
 (0)