From: YueHaibing <yuehaibing@huawei.com>
To: <kys@microsoft.com>, <haiyangz@microsoft.com>,
<sthemmin@microsoft.com>, <sashal@kernel.org>,
<tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
<hpa@zytor.com>, <x86@kernel.org>, <mikelley@microsoft.com>,
<wei.liu@kernel.org>, <parri.andrea@gmail.com>
Cc: <linux-hyperv@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH -next] x86/hyperv: Fix build error while CONFIG_PARAVIRT=n
Date: Fri, 18 Oct 2019 16:29:21 +0800 [thread overview]
Message-ID: <20191018082921.28164-1-yuehaibing@huawei.com> (raw)
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
next reply other threads:[~2019-10-18 8:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 8:29 YueHaibing [this message]
2019-10-18 10:39 ` [PATCH -next] x86/hyperv: Fix build error while CONFIG_PARAVIRT=n Andrea Parri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191018082921.28164-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=bp@alien8.de \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=mingo@redhat.com \
--cc=parri.andrea@gmail.com \
--cc=sashal@kernel.org \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=wei.liu@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).