* [PATCH 1/1] x86/hyper-v: Fix 'set but not used' warnings
@ 2018-12-22 0:06 Michael Kelley
2018-12-24 3:14 ` Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: Michael Kelley @ 2018-12-22 0:06 UTC (permalink / raw)
To: sashal, gregkh, linux-kernel, devel, olaf, apw, vkuznets,
jasowang, marcelo.cerri, Stephen Hemminger, KY Srinivasan
Cc: Michael Kelley
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@microsoft.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] x86/hyper-v: Fix 'set but not used' warnings
2018-12-22 0:06 [PATCH 1/1] x86/hyper-v: Fix 'set but not used' warnings Michael Kelley
@ 2018-12-24 3:14 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2018-12-24 3:14 UTC (permalink / raw)
To: Michael Kelley
Cc: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang,
marcelo.cerri, Stephen Hemminger, KY Srinivasan
On Sat, Dec 22, 2018 at 12:06:58AM +0000, Michael Kelley wrote:
>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@microsoft.com>
Queued up, thank you.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-24 3:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-22 0:06 [PATCH 1/1] x86/hyper-v: Fix 'set but not used' warnings Michael Kelley
2018-12-24 3:14 ` Sasha Levin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.