[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 4 Apr 2022 18:54:18 +0800
From: Gavin Shan <gshan@...hat.com>
To: kernel test robot <lkp@...el.com>, kvmarm@...ts.cs.columbia.edu
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
eauger@...hat.com, oupton@...gle.com, Jonathan.Cameron@...wei.com,
vkuznets@...hat.com, will@...nel.org, shannon.zhaosl@...il.com,
james.morse@....com, mark.rutland@....com, maz@...nel.org,
pbonzini@...hat.com, shan.gavin@...il.com
Subject: Re: [PATCH] KVM: arm64: fix returnvar.cocci warnings
On 4/4/22 6:26 PM, kernel test robot wrote:
> From: kernel test robot <lkp@...el.com>
>
> arch/arm64/kvm/sdei.c:346:15-18: Unneeded variable: "ret". Return "SDEI_SUCCESS" on line 352
>
>
> Remove unneeded variable used to store return value.
>
> Generated by: scripts/coccinelle/misc/returnvar.cocci
>
> CC: Gavin Shan <gshan@...hat.com>
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: kernel test robot <lkp@...el.com>
> ---
>
> url: https://github.com/intel-lab-lkp/linux/commits/Gavin-Shan/Support-SDEI-Virtualization/20220403-234350
> base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git be2d3ecedd9911fbfd7e55cc9ceac5f8b79ae4cf
> :::::: branch date: 19 hours ago
> :::::: commit date: 19 hours ago
>
> arch/arm64/kvm/sdei.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- a/arch/arm64/kvm/sdei.c
> +++ b/arch/arm64/kvm/sdei.c
> @@ -343,13 +343,12 @@ out:
> static unsigned long hypercall_mask(struct kvm_vcpu *vcpu, bool mask)
> {
> struct kvm_sdei_vcpu *vsdei = vcpu->arch.sdei;
> - unsigned long ret = SDEI_SUCCESS;
>
> spin_lock(&vsdei->lock);
> vsdei->masked = mask ? 1 : 0;
> spin_unlock(&vsdei->lock);
>
> - return ret;
> + return SDEI_SUCCESS;
> }
>
> int kvm_sdei_call(struct kvm_vcpu *vcpu)
>
Thanks for reporting the warning. I will fold the changes in next respin
if needed.
Thanks,
Gavin
Powered by blists - more mailing lists