KVM: PPC: remove unneeded variable
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 KVM: PPC: remove unneeded variable
fix the following coccicheck warning:
arch/powerpc/kvm/book3s_pr.c:424:5-6: Unneeded variable: "r".
Signed-off-by Mingtong Bao <[email protected]>
--- arch/powerpc/kvm/book3s_pr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/powerpc/kvm/book3s_pr.c +2 -3
@@ -421,14 +421,13 @@ void kvmppc_restore_tm_pr(struct kvm_vcpu *vcpu)static int kvmppc_core_check_requests_pr (struct kvm_vcpu *vcpu) { -int r =1 ;/* Indicate we want to get back into the guest */ /* We misuse TLB_FLUSH to indicate that we want to clear all shadow cache entries */ if (kvm_check_request (KVM_REQ_TLB_FLUSH , vcpu))kvmppc_mmu_pte_flush (vcpu,0 ,0 ); - -return r; +/* Indicate we want to get back into the guest */ +return 1 ; }/************* MMU Notifiers *************/
Quoted 21 lines · On 14/06/2023 07.58, [email protected] wrote:
fix the following coccicheck warning:
arch/powerpc/kvm/book3s_pr.c:424:5-6: Unneeded variable: "r".
Signed-off-by Mingtong Bao <[email protected]>--- arch/powerpc/kvm/book3s_pr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)arch/powerpc/kvm/book3s_pr.c +0
-1@@ -421,14 +421,13 @@ void kvmppc_restore_tm_pr(struct kvm_vcpu *vcpu) static int kvmppc_core_check_requests_pr(struct kvm_vcpu *vcpu) { - int r = 1; /* Indicate we want to get back into the guest */ /* We misuse TLB_FLUSH to indicate that we want to clear
arch/powerpc/kvm/book3s_pr.c void kvmppc_restore_tm_pr(struct kvm_vcpu *vcpu) · line 433
Quoted 10 lines
arch/powerpc/kvm/book3s_pr.c +2
-2all shadow cache entries */ if (kvm_check_request(KVM_REQ_TLB_FLUSH, vcpu)) kvmppc_mmu_pte_flush(vcpu, 0, 0); - - return r; + /* Indicate we want to get back into the guest */ + return 1; } /************* MMU Notifiers *************/
Please make sure to CC: [email protected] when sending patches for KVM on ppc.
Reviewed-by Thomas Huth <[email protected]>