Re: [PATCH] KVM: arm64: fix returnvar.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/4/22 6:26 PM, kernel test robot wrote:
From: kernel test robot <lkp@xxxxxxxxx>

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@xxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
---

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

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux