From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACBE0C433F5 for ; Mon, 4 Apr 2022 10:54:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358571AbiDDK4f (ORCPT ); Mon, 4 Apr 2022 06:56:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358840AbiDDK43 (ORCPT ); Mon, 4 Apr 2022 06:56:29 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0C50B35DCB for ; Mon, 4 Apr 2022 03:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649069672; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x9+MGQ9pc0+gu5/aAz5h5cWsJ9sz5YMy85FxqLq15ig=; b=cOYDWwcdP7+oTVBE7N3GB0JUEbx3ylhAaBf6DZirsVvNi7VTAiejU/jC7/U4pajDTJFXcZ W5nkv8jjbz80uKEev4lh9oC4U03aMpbTb87BRKBVX3gxasdRDsIvU9V5+Ho4zXezDII0mU fQq9taTfu4G1ZZKzsCAlK+l68doWVLU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-557-rgKEaItKOT6OFJFE16bHMQ-1; Mon, 04 Apr 2022 06:54:29 -0400 X-MC-Unique: rgKEaItKOT6OFJFE16bHMQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 58B1128EC103; Mon, 4 Apr 2022 10:54:28 +0000 (UTC) Received: from [10.72.12.126] (ovpn-12-126.pek2.redhat.com [10.72.12.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFD3DC584FA; Mon, 4 Apr 2022 10:54:21 +0000 (UTC) Reply-To: Gavin Shan Subject: Re: [PATCH] KVM: arm64: fix returnvar.cocci warnings To: kernel test robot , kvmarm@lists.cs.columbia.edu Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, eauger@redhat.com, oupton@google.com, Jonathan.Cameron@huawei.com, vkuznets@redhat.com, will@kernel.org, shannon.zhaosl@gmail.com, james.morse@arm.com, mark.rutland@arm.com, maz@kernel.org, pbonzini@redhat.com, shan.gavin@gmail.com References: <20220403153911.12332-11-gshan@redhat.com> From: Gavin Shan Message-ID: <3afd08d2-223c-ea02-0983-616fee32e587@redhat.com> Date: Mon, 4 Apr 2022 18:54:18 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/4/22 6:26 PM, kernel test robot wrote: > From: kernel test robot > > 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 > Reported-by: kernel test robot > Signed-off-by: kernel test robot > --- > > 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