x86/hyper-v: Fix 'set but not used' warnings
Subsystems (2)
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 <[email protected]>
--- arch/x86/hyperv/hv_apic.c | 2 +- arch/x86/hyperv/hv_spinlock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/hyperv/hv_apic.c +1 -1
@@ -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 :
arch/x86/hyperv/hv_spinlock.c +1 -1
@@ -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 ())
Signature · 1 line
1.8.3.1
Sasha Levin
AppliedQuoted 5 lines · Michael Kelley
In these two cases, a value returned by
rdmsr()orrdmsrl()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 <[email protected]>
Queued up, thank you.
--
Thanks,
Sasha