[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1545437169-18069-1-git-send-email-mikelley@microsoft.com>
Date: Sat, 22 Dec 2018 00:06:58 +0000
From: Michael Kelley <mikelley@...rosoft.com>
To: "sashal@...nel.org" <sashal@...nel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"olaf@...fle.de" <olaf@...fle.de>,
"apw@...onical.com" <apw@...onical.com>,
vkuznets <vkuznets@...hat.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"marcelo.cerri@...onical.com" <marcelo.cerri@...onical.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
KY Srinivasan <kys@...rosoft.com>
CC: Michael Kelley <mikelley@...rosoft.com>
Subject: [PATCH 1/1] x86/hyper-v: Fix 'set but not used' warnings
In these two cases, a value returned by rdmsr() or rdmsrl()
is ignored. Indicate that ignoring the value is intentional, so
that with the W=1 compilation option no warning is generated.
Signed-off-by: Michael Kelley <mikelley@...rosoft.com>
---
arch/x86/hyperv/hv_apic.c | 2 +-
arch/x86/hyperv/hv_spinlock.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c
index 8eb6fbee..66a0f53 100644
--- a/arch/x86/hyperv/hv_apic.c
+++ b/arch/x86/hyperv/hv_apic.c
@@ -55,7 +55,7 @@ static void hv_apic_icr_write(u32 low, u32 id)
static u32 hv_apic_read(u32 reg)
{
- u32 reg_val, hi;
+ u32 reg_val, __maybe_unused hi;
switch (reg) {
case APIC_EOI:
diff --git a/arch/x86/hyperv/hv_spinlock.c b/arch/x86/hyperv/hv_spinlock.c
index a861b04..e18c63d5 100644
--- a/arch/x86/hyperv/hv_spinlock.c
+++ b/arch/x86/hyperv/hv_spinlock.c
@@ -25,7 +25,7 @@ static void hv_qlock_kick(int cpu)
static void hv_qlock_wait(u8 *byte, u8 val)
{
- unsigned long msr_val;
+ unsigned long __maybe_unused msr_val;
unsigned long flags;
if (in_nmi())
--
1.8.3.1
Powered by blists - more mailing lists