Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1719516ybg; Sat, 19 Oct 2019 01:02:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqypIR52W4j56J4VJCMhMFNkl182JW8JpzwHY0tCw1Hs21VRyzV/e7LBMBhep0sE827gwMK3 X-Received: by 2002:a50:f742:: with SMTP id j2mr13799163edn.253.1571472157213; Sat, 19 Oct 2019 01:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472157; cv=none; d=google.com; s=arc-20160816; b=gzk8cFOsZLkuroB1ndW7P4VQIdwPBGNdBaDYgUlxGsXvXyti9RFHKL5GJ8E6fnjdMt j8zMR9ejw8kDqoCinJy1hOpecEV+2vNf7BmFWOnzf5P3UXyyNrthppy4/XfK8Z/wzK78 wDV3L8YxgeXipivURmAKOIH2HTUAgMFKjKsFzeG5E0d7C8z1LkQsrBUYaMxwG3nLalJk 1G9/v4zHaNcwCmV2TohujAl52ESx2mSR5paZx6xakDg0c9sU/Df3UjyImOgzqrWMOtr/ ve5Nun8UljtQeenNErUejFISjEIp2LV+A0pbXNQWhKhVWOVlXQ627IW2d4mdtlYnulh1 eL5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=6wIyqgsSy3ix7CBn4H5ZDR1HkOorC7rpWmSLuKgsfl0=; b=p0tnxUd/oCslpHg68iPkimDGLPNYMjMrqh5SYcE3Vy+ZU+Yjf0a9+lhe0KsyH82DM+ JKsWM+/5rKaCdr6AynggKlhBUYCa3eYPCLTJyRYwQmMF0/MuvFjl7fpOxSO4SoZXMJKC imkufojWli2A0LVRWRFB+i6UfyuWKfgtG6iBAhzQ8NpVb9oh1WfE7UgN9PZ8JrxXNfWG aAWMRMKpzuhaYZJovvpDNLlzg1cyctjZL6QbhHiEdlY8XUubjL/264qvpSqxfrtxv1mf RRokrg0atLNx+HdoKzgqRnH9WCU2cgjX3pbWjpJWx8U7gug3JfK0OWYjTAwFf4c0l19i D7Bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g21si5601318edq.289.2019.10.19.01.02.14; Sat, 19 Oct 2019 01:02:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2632811AbfJRIaX (ORCPT + 99 others); Fri, 18 Oct 2019 04:30:23 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4687 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727573AbfJRIaX (ORCPT ); Fri, 18 Oct 2019 04:30:23 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id C2E74FC5DD1294023AB5; Fri, 18 Oct 2019 16:30:20 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Fri, 18 Oct 2019 16:30:10 +0800 From: YueHaibing To: , , , , , , , , , , , CC: , , YueHaibing Subject: [PATCH -next] x86/hyperv: Fix build error while CONFIG_PARAVIRT=n Date: Fri, 18 Oct 2019 16:29:21 +0800 Message-ID: <20191018082921.28164-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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