lkml.org 
[lkml]   [2022]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: arm64: fix returnvar.cocci warnings
From
Date
On 4/4/22 6:26 PM, kernel test robot wrote:
> From: kernel test robot <lkp@intel.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@redhat.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.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

\
 
 \ /
  Last update: 2022-04-04 12:55    [W:0.092 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site