Skip to content

Commit f0a3d1d

Browse files
nathanchanceliuw
authored andcommitted
x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub
When building without CONFIG_AMD_MEM_ENCRYPT, there are several repeated instances of -Wunused-function due to missing 'inline' on the stub of hy_snp_boot_ap(): In file included from drivers/hv/hv_common.c:29: ./arch/x86/include/asm/mshyperv.h:272:12: error: 'hv_snp_boot_ap' defined but not used [-Werror=unused-function] 272 | static int hv_snp_boot_ap(int cpu, unsigned long start_ip) { return 0; } | ^~~~~~~~~~~~~~ cc1: all warnings being treated as errors Add 'inline' to fix the warnings. Fixes: 44676bb ("x86/hyperv: Add smp support for SEV-SNP guest") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: Wei Liu <wei.liu@kernel.org> Link: https://lore.kernel.org/r/20230822-hv_snp_boot_ap-missing-inline-v1-1-e712dcb2da0f@kernel.org
1 parent bb9b0e4 commit f0a3d1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/include/asm/mshyperv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static inline void hv_ghcb_msr_read(u64 msr, u64 *value) {}
269269
static inline bool hv_ghcb_negotiate_protocol(void) { return false; }
270270
static inline void hv_ghcb_terminate(unsigned int set, unsigned int reason) {}
271271
static inline void hv_vtom_init(void) {}
272-
static int hv_snp_boot_ap(int cpu, unsigned long start_ip) { return 0; }
272+
static inline int hv_snp_boot_ap(int cpu, unsigned long start_ip) { return 0; }
273273
#endif
274274

275275
extern bool hv_isolation_type_snp(void);

0 commit comments

Comments
 (0)