mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.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
Subject: Re: [PATCH] KVM: x86: Remove unused variable rc
Date: Fri, 19 Mar 2021 10:30:58 +0100	[thread overview]
Message-ID: <e8dc7779-346f-b63a-59d0-bc70fceeb1cb@redhat.com> (raw)
In-Reply-To: <1616143992-30228-1-git-send-email-jiapeng.chong@linux.alibaba.com>

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 <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>   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


      reply	other threads:[~2021-03-19  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  8:53 Jiapeng Chong
2021-03-19  9:30 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8dc7779-346f-b63a-59d0-bc70fceeb1cb@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®