x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub
Subsystems (3)
PATCH 1/1 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.
--- arch/x86/include/asm/mshyperv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/mshyperv.h +1 -1
@@ -269,7 +269,7 @@ static inline void hv_ghcb_msr_read(u64 msr, u64 *value) {}static inline bool hv_ghcb_negotiate_protocol (void ) {return false; }static inline void hv_ghcb_terminate (unsigned int set,unsigned int reason) {}static inline void hv_vtom_init (void ) {} -static int hv_snp_boot_ap (int cpu,unsigned long start_ip) {return 0 ; } +static inline int hv_snp_boot_ap (int cpu,unsigned long start_ip) {return 0 ; }#endif extern bool hv_isolation_type_snp (void );
---
base-commit: bb9b0e46b84c19d3dd7d453a2da71a0fdc172b31
change-id: 20230822-hv_snp_boot_ap-missing-inline-205e615e4fe6
Best regards,
Signature · 1 line
Nathan Chancellor <[email protected]>
Quoted 12 lines
From: Nathan Chancellor <[email protected]>
Sent: Tuesday, August 22, 2023 11:26 AM
[...]
When building withoutCONFIG_AMD_MEM_ENCRYPT, there are several repeated instances of -Wunused-function due to missing 'inline' on the stub ofhy_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 inthv_snp_boot_ap(int cpu, unsigned long start_ip){ return
0; }
Quoted 7 lines
| ^~~~~~~~~~~~~~cc1: all warnings being treated as errors
Add 'inline' to fix the warnings.
Fixes 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP guest")Signed-off-by Nathan Chancellor <[email protected]>
Quoted 15 lines · Dexuan Cui
Quoted 15 lines
From: Nathan Chancellor <[email protected]>
Sent: Tuesday, August 22, 2023 11:26 AM
[...]
When building withoutCONFIG_AMD_MEM_ENCRYPT, there are several repeated instances of -Wunused-function due to missing 'inline' on the stub ofhy_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 inthv_snp_boot_ap(int cpu, unsigned long start_ip){ return
0; }| ^~~~~~~~~~~~~~cc1: all warnings being treated as errors
Quoted 6 lines
Quoted 4 lines
Add 'inline' to fix the warnings.
Fixes 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP guest")Signed-off-by Nathan Chancellor <[email protected]>Reviewed-by Dexuan Cui <[email protected]>
Applied. Thanks.