lkml.org 
[lkml]   [2016]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 003/127] MIPS: KVM: Fix unused variable build warning
    Date
    From: Nicholas Mc Guire <hofrat@osadl.org>

    3.12-stable review patch. If anyone has any objections, please let me know.

    ===============

    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>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    ---
    arch/mips/kvm/kvm_mips_emul.c | 6 ------
    1 file changed, 6 deletions(-)

    diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c
    index 7f3fb19d2156..779a376c4cce 100644
    --- a/arch/mips/kvm/kvm_mips_emul.c
    +++ b/arch/mips/kvm/kvm_mips_emul.c
    @@ -1655,7 +1655,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);
    @@ -1663,11 +1662,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;
    --
    2.10.2
    \
     
     \ /
      Last update: 2016-11-25 10:08    [W:4.076 / U:0.452 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site