lkml.org 
[lkml]   [2022]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] KVM: arm64: fix returnvar.cocci warnings
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)
\
 
 \ /
  Last update: 2022-04-04 12:28    [W:0.255 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site