[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1431099532-30298-1-git-send-email-hofrat@osadl.org>
Date: Fri, 8 May 2015 17:38:52 +0200
From: Nicholas Mc Guire <hofrat@...dl.org>
To: Gleb Natapov <gleb@...nel.org>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Ralf Baechle <ralf@...ux-mips.org>,
James Hogan <james.hogan@...tec.com>, kvm@...r.kernel.org,
linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
Nicholas Mc Guire <hofrat@...dl.org>
Subject: [PATCH] MIPS: KVM: fix unused variable build warning
As kvm_mips_complete_mmio_load() did not yet modify PC at this point
as James Hogans <james.hogan@...tec.com> explained the curr_pc variable
and the comments along with it can be dropped.
Signed-off-by: Nicholas Mc Guire <hofrat@...dl.org>
Link: http://lkml.org/lkml/2015/5/8/422
---
buildwarning being fixed in -next-20150508:
arch/mips/kvm/emulate.c: In function 'kvm_mips_complete_mmio_load':
arch/mips/kvm/emulate.c:2392:16: warning: variable 'curr_pc' set but not
used [-Wunused-but-set-variable]
Patch was only compile tested msp71xx_defconfig + CONFIG_KVM=m
Patch is against 4.1-rc2 (localversion-next is -next-20150508)
arch/mips/kvm/emulate.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
index 6230f37..4b50c57 100644
--- a/arch/mips/kvm/emulate.c
+++ b/arch/mips/kvm/emulate.c
@@ -2389,7 +2389,6 @@ enum emulation_result kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu,
{
unsigned long *gpr = &vcpu->arch.gprs[vcpu->arch.io_gpr];
enum emulation_result er = EMULATE_DONE;
- unsigned long curr_pc;
if (run->mmio.len > sizeof(*gpr)) {
kvm_err("Bad MMIO length: %d", run->mmio.len);
@@ -2397,11 +2396,6 @@ enum emulation_result kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu,
goto done;
}
- /*
- * Update PC and hold onto current PC in case there is
- * an error and we want to rollback the PC
- */
- curr_pc = vcpu->arch.pc;
er = update_pc(vcpu, vcpu->arch.pending_load_cause);
if (er == EMULATE_FAIL)
return er;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists