patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub
@ 2023-08-22 18:25 Nathan Chancellor
  2023-08-23  1:00 ` Dexuan Cui
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2023-08-22 18:25 UTC (permalink / raw)
  To: kys, haiyangz, wei.liu, decui
  Cc: x86, mikelley, tiala, linux-hyperv, linux-kernel, patches,
	Nathan Chancellor

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: 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP guest")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/x86/include/asm/mshyperv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index 6bd9ae04d9c3..b6be267ff3d0 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -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,
-- 
Nathan Chancellor <nathan@kernel.org>


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

* RE: [PATCH] x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub
  2023-08-22 18:25 [PATCH] x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub Nathan Chancellor
@ 2023-08-23  1:00 ` Dexuan Cui
  2023-08-23  5:41   ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Dexuan Cui @ 2023-08-23  1:00 UTC (permalink / raw)
  To: Nathan Chancellor, KY Srinivasan, Haiyang Zhang,
	wei.liu@kernel.org, linux-hyperv@vger.kernel.org
  Cc: x86@kernel.org, Michael Kelley (LINUX), Tianyu Lan,
	linux-kernel@vger.kernel.org, patches@lists.linux.dev

> From: Nathan Chancellor <nathan@kernel.org>
> Sent: Tuesday, August 22, 2023 11:26 AM
> [...]
> 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: 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP guest")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Reviewed-by: Dexuan Cui <decui@microsoft.com>

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

* Re: [PATCH] x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub
  2023-08-23  1:00 ` Dexuan Cui
@ 2023-08-23  5:41   ` Wei Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2023-08-23  5:41 UTC (permalink / raw)
  To: Dexuan Cui
  Cc: Nathan Chancellor, KY Srinivasan, Haiyang Zhang,
	wei.liu@kernel.org, linux-hyperv@vger.kernel.org, x86@kernel.org,
	Michael Kelley (LINUX), Tianyu Lan, linux-kernel@vger.kernel.org,
	patches@lists.linux.dev

On Wed, Aug 23, 2023 at 01:00:55AM +0000, Dexuan Cui wrote:
> > From: Nathan Chancellor <nathan@kernel.org>
> > Sent: Tuesday, August 22, 2023 11:26 AM
> > [...]
> > 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: 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP guest")
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> 
> Reviewed-by: Dexuan Cui <decui@microsoft.com>

Applied. Thanks.

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

end of thread, other threads:[~2023-08-23  5:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-22 18:25 [PATCH] x86/hyperv: Add missing 'inline' to hv_snp_boot_ap() stub Nathan Chancellor
2023-08-23  1:00 ` Dexuan Cui
2023-08-23  5:41   ` Wei Liu

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).