Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1221325pxf; Fri, 19 Mar 2021 01:55:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMKhPH5wDbDLciEQAam69TWK+qrX3EpAT/++JwxAz6oVFJdnqoOf9Jo3zhwGVPwtzpqL7W X-Received: by 2002:a17:906:aada:: with SMTP id kt26mr3003833ejb.137.1616144147773; Fri, 19 Mar 2021 01:55:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616144147; cv=none; d=google.com; s=arc-20160816; b=zA9ZqRdp6RI9Ago31xL3k125aFBt3eE9q3x0i/9dH8L/fWL+lK5br3sOBq6EAUGyl9 29c/+NWlAafYz/AlWJ5qrbtFzKNfY9te0WDirk5n5z7G8EtA49FyzlW0GIwBeZUiIGQP Bb0K/6nDwyNqZVU6gOlml0vI+11yUD8f1NCr1ZCMtdnI7W2MqRHp+y0EQYkXihWEfd+y XJ2fdQS6Lc/s5BDKkK90yN7NpgsYhp/KD+YBYa/TWucapjq0X+YKThYLZxKEHWLYkAuR X3drG9/zfLLZZcAJ3SKM3/239isdNgw3lC1IJGPRhOCDu/9G2hP7pedYaxC4H4Sx6I65 NJTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=VVatyK+s7LDbItUVIXL2hyp3fuL+wfuC78hv9hDhtxc=; b=rUiCrV8w6WbL1WmKNfqgKrrt5cU5xFZC6eGp/r6IJXaptJ75EuUIsBQ9veqTLtIq/W 729jWLDpGkWM3L4GYdS/GtbdZl9AwlDiL2mSIUD+RPKkcwCkQXSvwhyUUB+BBzxIJA/I rGO9cKsC8bxy77VyTvVcIf5KG56+zGqz3nEs+aeknwBT1v6iojLC00Qp4O2OGWz+4Jy/ 2A7rKgyqbyKUyfgf1Nc164Di4L0SBUNccieDJlOQaI9unamoRWdSFFU+m5ziPD8XVR/B vdgZnqoPUvGzKfhDT3shKRG55xYefZQWQr/eT6OmVDVn+kFgpqtMVxc3B6AKiHqjI+Qz NpgQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr29si3503651ejc.532.2021.03.19.01.55.25; Fri, 19 Mar 2021 01:55: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbhCSIxx (ORCPT + 99 others); Fri, 19 Mar 2021 04:53:53 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:42757 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbhCSIxV (ORCPT ); Fri, 19 Mar 2021 04:53:21 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R701e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0USZNPTU_1616143992; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0USZNPTU_1616143992) by smtp.aliyun-inc.com(127.0.0.1); Fri, 19 Mar 2021 16:53:18 +0800 From: Jiapeng Chong To: pbonzini@redhat.com 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, Jiapeng Chong Subject: [PATCH] KVM: x86: Remove unused variable rc Date: Fri, 19 Mar 2021 16:53:12 +0800 Message-Id: <1616143992-30228-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- 1.8.3.1