diff mbox

[BACKPORT,3.10..3.16,1/2] MIPS: KVM: Fix unused variable build warning

Message ID 2e791b20c24570339d15118a55e174f5b2d63ac1.1478707766.git-series.james.hogan@imgtec.com (mailing list archive)
State New, archived
Headers show

Commit Message

James Hogan Nov. 9, 2016, 4:13 p.m. UTC
From: Nicholas Mc Guire <hofrat@osadl.org>

commit 5f508c43a7648baa892528922402f1e13f258bd4 upstream.

As kvm_mips_complete_mmio_load() did not yet modify PC at this point
as James Hogans <james.hogan@imgtec.com> explained the curr_pc variable
and the comments along with it can be dropped.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Link: http://lkml.org/lkml/2015/5/8/422
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: kvm@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9993/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
[james.hogan@imgtec.com: Backport to 3.10..3.16]
Signed-off-by: James Hogan <james.hogan@imgtec.com>
---
 arch/mips/kvm/kvm_mips_emul.c | 6 ------
 1 file changed, 0 insertions(+), 6 deletions(-)

Comments

Willy Tarreau Nov. 9, 2016, 5:28 p.m. UTC | #1
Both patches queued for 3.10.y, thanks James!

Willy
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiri Slaby Nov. 9, 2016, 9:28 p.m. UTC | #2
On 11/09/2016, 05:13 PM, James Hogan wrote:
> From: Nicholas Mc Guire <hofrat@osadl.org>
> 
> commit 5f508c43a7648baa892528922402f1e13f258bd4 upstream.

Both applied now to 3.12, albeit the latter didn't apply cleanly.

thanks,
James Hogan Nov. 9, 2016, 10:11 p.m. UTC | #3
On Wed, Nov 09, 2016 at 10:28:58PM +0100, Jiri Slaby wrote:
> On 11/09/2016, 05:13 PM, James Hogan wrote:
> > From: Nicholas Mc Guire <hofrat@osadl.org>
> > 
> > commit 5f508c43a7648baa892528922402f1e13f258bd4 upstream.
> 
> Both applied now to 3.12, albeit the latter didn't apply cleanly.

/me digs in terminal log

Sorry, I used patch -p1 intentionally when testing 3.12 to try to spot
unclean stable patches, expecting it to reject it, but didn't spot the
fuzz:

$ git show 4.9/kvm/fixes_rc3/stable/3.16 | patch -p1                                                                                 
patching file arch/mips/include/asm/kvm_host.h
Hunk #1 succeeded at 375 with fuzz 2 (offset -28 lines).
...

Thanks
James
diff mbox

Patch

diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c
index 1983678883c9..a32e838d9aeb 100644
--- a/arch/mips/kvm/kvm_mips_emul.c
+++ b/arch/mips/kvm/kvm_mips_emul.c
@@ -2115,7 +2115,6 @@  kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu, struct kvm_run *run)
 {
 	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)) {
 		printk("Bad MMIO length: %d", run->mmio.len);
@@ -2123,11 +2122,6 @@  kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu, struct kvm_run *run)
 		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;