linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] x86/hyperv: Fix build error while CONFIG_PARAVIRT=n
@ 2019-10-18  8:29 YueHaibing
  2019-10-18 10:39 ` Andrea Parri
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-10-18  8:29 UTC (permalink / raw)
  To: kys, haiyangz, sthemmin, sashal, tglx, mingo, bp, hpa, x86,
	mikelley, wei.liu, parri.andrea
  Cc: linux-hyperv, linux-kernel, YueHaibing

while CONFIG_PARAVIRT=n, building fails:

arch/x86/kernel/cpu/mshyperv.c: In function ms_hyperv_init_platform:
arch/x86/kernel/cpu/mshyperv.c:219:2: error: pv_info undeclared (first use in this function); did you mean pr_info?
  pv_info.name = "Hyper-V";
  ^~~~~~~

Wrap it into a #ifdef to fix this.

Fixes: 628270ef628a ("x86/hyperv: Set pv_info.name to "Hyper-V"")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 arch/x86/kernel/cpu/mshyperv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index e7f0776..c656d92 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -216,7 +216,9 @@ static void __init ms_hyperv_init_platform(void)
 	int hv_host_info_ecx;
 	int hv_host_info_edx;
 
+#ifdef CONFIG_PARAVIRT
 	pv_info.name = "Hyper-V";
+#endif
 
 	/*
 	 * Extract the features and hints
-- 
2.7.4



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

end of thread, other threads:[~2019-10-18 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18  8:29 [PATCH -next] x86/hyperv: Fix build error while CONFIG_PARAVIRT=n YueHaibing
2019-10-18 10:39 ` Andrea Parri

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