Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1240489pxf; Fri, 19 Mar 2021 02:32:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPvA5LRtpE5COxI0P6+XmouzXjgrSMAmO5zJa1tSV1ht9lsgkcdW9udXvAVT/jK2n54//h X-Received: by 2002:a50:ee95:: with SMTP id f21mr8493551edr.130.1616146367366; Fri, 19 Mar 2021 02:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616146367; cv=none; d=google.com; s=arc-20160816; b=i02oRzGA3lnqc5P/83LALCc6VMWUv4zs2fX4uNabc2vkZM8hwarCACqbtmID5tv60T nYU3fanVriORe8pChnbdwwtPB41BuTUIK+k9n1bpMp8ol2fZSte/A+qTHWuHCiHdSdrh q3z1GDjEAfIfQw3ht99wq22mm9igso7lK4t2fd4jPSo6FuUEnIox6OsUj8NfJPENVdC6 y2+P/bgo5Ge999TDjbpfbWPbdKm563S+5c4DmikSLuptHAPzaic6DZkfdIdqSPtRSEP0 aNbpPw4pGOQ6+NxPfWApei4IgqVMCralhwgeCqDDtVK+JLM6L3Q4NbWz/SS/8P6w2daP I4fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=oYHOK4lMWpC+xS3RIkmJjIMrFZxUWa5W6Haf+gFHPEo=; b=JdcFXWmTl/3N2NDCBLBvFnKC2Vc6y9oijiEscEw4Y9+LpjGqEmMuDe/FF0j9fV1PTh u8ySrsCHbdBtiFCtPq/ZJJ1fYkzA/QxS3JUEDYhQjU1EMsYN/wr0Z4lw5sq/LeOKSex+ nXKYI7Yd4FaLt6wuWQN+EDpYsI7kOwCkxytJVu/zvrQl2na/edKpmT8nayOtHDM+0bIn +dIzoenNrlLUKhIH203tLOMrtHGe9OLjiC8sIIRMpFDEkS/xD1Q3actJWvOL0WkzoxH8 mWhyMRpIrMKa8zsC4EMoN5asjeUavplJiS+RsAfTNsyWN/WNGnkFab5hiyMv4YfJfx0f 6hWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZbaBzumc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p10si3749241eji.76.2021.03.19.02.32.24; Fri, 19 Mar 2021 02:32:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZbaBzumc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230009AbhCSJb1 (ORCPT + 99 others); Fri, 19 Mar 2021 05:31:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:21651 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbhCSJbD (ORCPT ); Fri, 19 Mar 2021 05:31:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616146263; h=from:from: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=oYHOK4lMWpC+xS3RIkmJjIMrFZxUWa5W6Haf+gFHPEo=; b=ZbaBzumcn3ah7geulhQGpLnsre5yREMww26oPKfJeOU/h4ZamwJB9Knk5aOQDjlJ7EpBPH WU/2agKMv5TdakjkK/Jbp3oBAeXSMjfmkVyR3uVDdG6ovqhPJrZ8zfjxtpLvYGi/I1mx9C yse5KvNJ9JT/im51wgcSQbuZnaHwpm8= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-392-V3QLBezwPxO4aAdQXn3CUg-1; Fri, 19 Mar 2021 05:31:01 -0400 X-MC-Unique: V3QLBezwPxO4aAdQXn3CUg-1 Received: by mail-ej1-f69.google.com with SMTP id e13so17908433ejd.21 for ; Fri, 19 Mar 2021 02:31:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oYHOK4lMWpC+xS3RIkmJjIMrFZxUWa5W6Haf+gFHPEo=; b=aeUOwkXiNGnOxBH/XLhO+dJe5z0G+uIDEo6mIbHQAlv5eNw0UGiriT8OYAUS7lQU6k NHwqQnC1jr5QfcXWwWwEA0H8mRAcA4ouX9ukQUQhk15QzUhrcZlHENfivjVK+pVqN9IM vu4G2R7+cItS+FOr3p9Z2CsQCbrxw4uEZGPlXfDCpCPmJx2ntJ0X7IywmoCgj7f9MmzR QktpFpU40PaLcNEVqLLfbr7Qnfvk0dq5zGF/hFQnq7oDdCtypb6lw0SW8qJmGpMSgOEc Ga1Vr+A/KvSz1i7n6yAMbZxkxeT9raa7g7OLPhI8x07FbM6IquE8rIems+kego+76Xkj iQEQ== X-Gm-Message-State: AOAM531xqsI3GMeYDBXgzjJ5ec2sstsbsWGbRnHXTXoTPeEZtYDQaXXj wJEfLhIKIewU2RPXYkTsZ9M4qTNsxzLDhGuHRsJ2FmiPk7eJkouTGmI1XJ+61N3iJHh7ot+SCNK FIvBOhvefr50KhXZ8uw4HAQEfqWTDpmqPQHcwU6hKgy8W3ywjslE+EiUyPHXnEC0iaaU2rzHzhH Qp X-Received: by 2002:aa7:ccd7:: with SMTP id y23mr8413402edt.190.1616146260211; Fri, 19 Mar 2021 02:31:00 -0700 (PDT) X-Received: by 2002:aa7:ccd7:: with SMTP id y23mr8413372edt.190.1616146259918; Fri, 19 Mar 2021 02:30:59 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id v8sm3688136edx.38.2021.03.19.02.30.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Mar 2021 02:30:59 -0700 (PDT) Subject: Re: [PATCH] KVM: x86: Remove unused variable rc To: Jiapeng Chong Cc: seanjc@google.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1616143992-30228-1-git-send-email-jiapeng.chong@linux.alibaba.com> From: Paolo Bonzini Message-ID: Date: Fri, 19 Mar 2021 10:30:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <1616143992-30228-1-git-send-email-jiapeng.chong@linux.alibaba.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/03/21 09:53, Jiapeng Chong wrote: > Fix the following coccicheck warnings: > > ./arch/x86/kvm/emulate.c:4985:5-7: Unneeded variable: "rc". Return > "X86EMUL_CONTINUE" on line 5019. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > arch/x86/kvm/emulate.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c > index f7970ba..8ae1e16 100644 > --- a/arch/x86/kvm/emulate.c > +++ b/arch/x86/kvm/emulate.c > @@ -4982,8 +4982,6 @@ static unsigned imm_size(struct x86_emulate_ctxt *ctxt) > static int decode_imm(struct x86_emulate_ctxt *ctxt, struct operand *op, > unsigned size, bool sign_extension) > { > - int rc = X86EMUL_CONTINUE; > - > op->type = OP_IMM; > op->bytes = size; > op->addr.mem.ea = ctxt->_eip; > @@ -5016,7 +5014,7 @@ static int decode_imm(struct x86_emulate_ctxt *ctxt, struct operand *op, > } > } > done: > - return rc; > + return X86EMUL_CONTINUE; > } > > static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op, > Queued, thanks. Paolo