Skip to content
Snippets Groups Projects
  • Valdis Kletnieks's avatar
    82c881b2
    x86/microcode/AMD: Make stub function static inline · 82c881b2
    Valdis Kletnieks authored
    
    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: default avatarValdis Klētnieks <valdis.kletnieks@vt.edu>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
    Cc: x86@kernel.org
    Link: https://lkml.kernel.org/r/52170.1575603873@turing-police
    82c881b2
    History
    x86/microcode/AMD: Make stub function static inline
    Valdis Kletnieks authored
    
    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: default avatarValdis Klētnieks <valdis.kletnieks@vt.edu>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
    Cc: x86@kernel.org
    Link: https://lkml.kernel.org/r/52170.1575603873@turing-police