linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/microcode: make stub function static inline
@ 2019-12-06  3:44 Valdis Klētnieks
  2019-12-11 21:38 ` Borislav Petkov
  2019-12-12 21:33 ` [tip: x86/microcode] x86/microcode/AMD: Make " tip-bot2 for Valdis Klētnieks
  0 siblings, 2 replies; 8+ messages in thread
From: Valdis Klētnieks @ 2019-12-06  3:44 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar; +Cc: x86, linux-kernel

When building with C=1 W=1, 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 Kletnieks <valdis.kletnieks@vt.edu>

diff --git a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h
index 209492849566..6685e1218959 100644
--- a/arch/x86/include/asm/microcode_amd.h
+++ b/arch/x86/include/asm/microcode_amd.h
@@ -53,6 +53,6 @@ static inline void __init load_ucode_amd_bsp(unsigned int family) {}
 static inline void load_ucode_amd_ap(unsigned int family) {}
 static inline int __init
 save_microcode_in_initrd_amd(unsigned int family) { return -EINVAL; }
-void reload_ucode_amd(void) {}
+static inline void reload_ucode_amd(void) {}
 #endif
 #endif /* _ASM_X86_MICROCODE_AMD_H */


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-12 21:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06  3:44 [PATCH] x86/microcode: make stub function static inline Valdis Klētnieks
2019-12-11 21:38 ` Borislav Petkov
2019-12-11 23:33   ` Valdis Klētnieks
2019-12-12  8:58     ` Borislav Petkov
2019-12-12 10:06       ` Luc Van Oostenryck
2019-12-12 10:49         ` Borislav Petkov
2019-12-12 12:22   ` David Laight
2019-12-12 21:33 ` [tip: x86/microcode] x86/microcode/AMD: Make " tip-bot2 for Valdis Klētnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).