* [PATCH] KVM: PPC: remove unneeded variable [not found] <20230614023206.3865-1-luojianhong@cdjrlc.com> @ 2023-06-14 2:34 ` baomingtong001 2023-06-14 4:10 ` Paul Mackerras 0 siblings, 1 reply; 4+ messages in thread From: baomingtong001 @ 2023-06-14 2:34 UTC (permalink / raw) To: mpe, npiggin, christophe.leroy, pbonzini, paulus, seanjc, thuth Cc: linuxppc-dev, linux-kernel fix the following coccicheck warning: arch/powerpc/kvm/book3s_pr.c:424:5-6: Unneeded variable: "r". Signed-off-by: Mingtong Bao <baomingtong001@208suo.com> --- arch/powerpc/kvm/book3s_pr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 9118242063fb..d03b31b240d7 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -421,14 +421,14 @@ 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 */ + /* 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; + return 1; } /************* MMU Notifiers *************/ ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: PPC: remove unneeded variable 2023-06-14 2:34 ` [PATCH] KVM: PPC: remove unneeded variable baomingtong001 @ 2023-06-14 4:10 ` Paul Mackerras 0 siblings, 0 replies; 4+ messages in thread From: Paul Mackerras @ 2023-06-14 4:10 UTC (permalink / raw) To: baomingtong001 Cc: thuth, linux-kernel, npiggin, seanjc, pbonzini, linuxppc-dev On Wed, Jun 14, 2023 at 10:34:45AM +0800, baomingtong001@208suo.com wrote: > fix the following coccicheck warning: > > arch/powerpc/kvm/book3s_pr.c:424:5-6: Unneeded variable: "r". > > Signed-off-by: Mingtong Bao <baomingtong001@208suo.com> > --- > arch/powerpc/kvm/book3s_pr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c > index 9118242063fb..d03b31b240d7 100644 > --- a/arch/powerpc/kvm/book3s_pr.c > +++ b/arch/powerpc/kvm/book3s_pr.c > @@ -421,14 +421,14 @@ 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 */ > + /* Indicate we want to get back into the guest */ Instead of leaving the comment here, where it makes no sense, please move it to the return statement below. > > /* 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; > + return 1; > } > > /************* MMU Notifiers *************/ Paul. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20230614055354.27565-1-luojianhong@cdjrlc.com>]
* [PATCH] KVM: PPC: remove unneeded variable [not found] <20230614055354.27565-1-luojianhong@cdjrlc.com> @ 2023-06-14 5:58 ` baomingtong001 2023-06-21 6:59 ` Thomas Huth 0 siblings, 1 reply; 4+ messages in thread From: baomingtong001 @ 2023-06-14 5:58 UTC (permalink / raw) To: mpe, npiggin, christophe.leroy, pbonzini, paulus, maz, thuth fix the following coccicheck warning: arch/powerpc/kvm/book3s_pr.c:424:5-6: Unneeded variable: "r". Signed-off-by: Mingtong Bao <baomingtong001@208suo.com> --- arch/powerpc/kvm/book3s_pr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 9118242063fb..1b68de369b88 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -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 *************/ ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: PPC: remove unneeded variable 2023-06-14 5:58 ` baomingtong001 @ 2023-06-21 6:59 ` Thomas Huth 0 siblings, 0 replies; 4+ messages in thread From: Thomas Huth @ 2023-06-21 6:59 UTC (permalink / raw) To: baomingtong001, mpe, npiggin, christophe.leroy, pbonzini, paulus, maz Cc: Alexander Graf, linuxppc-dev On 14/06/2023 07.58, baomingtong001@208suo.com wrote: > fix the following coccicheck warning: > > arch/powerpc/kvm/book3s_pr.c:424:5-6: Unneeded variable: "r". > > Signed-off-by: Mingtong Bao <baomingtong001@208suo.com> > --- > arch/powerpc/kvm/book3s_pr.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c > index 9118242063fb..1b68de369b88 100644 > --- a/arch/powerpc/kvm/book3s_pr.c > +++ b/arch/powerpc/kvm/book3s_pr.c > @@ -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 *************/ > Please make sure to CC: linuxppc-dev@lists.ozlabs.org when sending patches for KVM on ppc. Reviewed-by: Thomas Huth <thuth@redhat.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-21 7:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230614023206.3865-1-luojianhong@cdjrlc.com>
2023-06-14 2:34 ` [PATCH] KVM: PPC: remove unneeded variable baomingtong001
2023-06-14 4:10 ` Paul Mackerras
[not found] <20230614055354.27565-1-luojianhong@cdjrlc.com>
2023-06-14 5:58 ` baomingtong001
2023-06-21 6:59 ` Thomas Huth
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).