]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
KVM: PPC: Remove set but not used variable 'ra', 'rs', 'rt'
authorzhengbin <zhengbin13@huawei.com>
Tue, 19 Nov 2019 06:27:40 +0000 (14:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:38:34 +0000 (08:38 +0100)
[ Upstream commit 4de0a8355463e068e443b48eb5ae32370155368b ]

Fixes gcc '-Wunused-but-set-variable' warning:

arch/powerpc/kvm/emulate_loadstore.c: In function kvmppc_emulate_loadstore:
arch/powerpc/kvm/emulate_loadstore.c:87:6: warning: variable ra set but not used [-Wunused-but-set-variable]
arch/powerpc/kvm/emulate_loadstore.c: In function kvmppc_emulate_loadstore:
arch/powerpc/kvm/emulate_loadstore.c:87:10: warning: variable rs set but not used [-Wunused-but-set-variable]
arch/powerpc/kvm/emulate_loadstore.c: In function kvmppc_emulate_loadstore:
arch/powerpc/kvm/emulate_loadstore.c:87:14: warning: variable rt set but not used [-Wunused-but-set-variable]

They are not used since commit 2b33cb585f94 ("KVM: PPC: Reimplement
LOAD_FP/STORE_FP instruction mmio emulation with analyse_instr() input")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kvm/emulate_loadstore.c

index 2e496eb86e94a0106dda78a750c07574e44a8cac..1139bc56e004552782a158d49f9a40e196b6e2f7 100644 (file)
@@ -73,7 +73,6 @@ int kvmppc_emulate_loadstore(struct kvm_vcpu *vcpu)
 {
        struct kvm_run *run = vcpu->run;
        u32 inst;
-       int ra, rs, rt;
        enum emulation_result emulated = EMULATE_FAIL;
        int advance = 1;
        struct instruction_op op;
@@ -85,10 +84,6 @@ int kvmppc_emulate_loadstore(struct kvm_vcpu *vcpu)
        if (emulated != EMULATE_DONE)
                return emulated;
 
-       ra = get_ra(inst);
-       rs = get_rs(inst);
-       rt = get_rt(inst);
-
        vcpu->arch.mmio_vsx_copy_nums = 0;
        vcpu->arch.mmio_vsx_offset = 0;
        vcpu->arch.mmio_copy_type = KVMPPC_VSX_COPY_NONE;