public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Saurabh Sengar <saurabh.truth@gmail.com>,
	glen@nernel.org, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: removing unused variable
Date: Mon, 2 Nov 2015 13:02:02 +0100	[thread overview]
Message-ID: <563750BA.7040104@redhat.com> (raw)
In-Reply-To: <1446189971-8038-1-git-send-email-saurabh.truth@gmail.com>



On 30/10/2015 08:26, Saurabh Sengar wrote:
> removing unused variables, found by coccinelle
> 
> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
> ---
>  arch/x86/kvm/x86.c | 16 +++++-----------
>  1 file changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 9a9a198..ec15294 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3424,41 +3424,35 @@ static int kvm_vm_ioctl_set_irqchip(struct kvm *kvm, struct kvm_irqchip *chip)
>  
>  static int kvm_vm_ioctl_get_pit(struct kvm *kvm, struct kvm_pit_state *ps)
>  {
> -	int r = 0;
> -
>  	mutex_lock(&kvm->arch.vpit->pit_state.lock);
>  	memcpy(ps, &kvm->arch.vpit->pit_state, sizeof(struct kvm_pit_state));
>  	mutex_unlock(&kvm->arch.vpit->pit_state.lock);
> -	return r;
> +	return 0;
>  }
>  
>  static int kvm_vm_ioctl_set_pit(struct kvm *kvm, struct kvm_pit_state *ps)
>  {
> -	int r = 0;
> -
>  	mutex_lock(&kvm->arch.vpit->pit_state.lock);
>  	memcpy(&kvm->arch.vpit->pit_state, ps, sizeof(struct kvm_pit_state));
>  	kvm_pit_load_count(kvm, 0, ps->channels[0].count, 0);
>  	mutex_unlock(&kvm->arch.vpit->pit_state.lock);
> -	return r;
> +	return 0;
>  }
>  
>  static int kvm_vm_ioctl_get_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)
>  {
> -	int r = 0;
> -
>  	mutex_lock(&kvm->arch.vpit->pit_state.lock);
>  	memcpy(ps->channels, &kvm->arch.vpit->pit_state.channels,
>  		sizeof(ps->channels));
>  	ps->flags = kvm->arch.vpit->pit_state.flags;
>  	mutex_unlock(&kvm->arch.vpit->pit_state.lock);
>  	memset(&ps->reserved, 0, sizeof(ps->reserved));
> -	return r;
> +	return 0;
>  }
>  
>  static int kvm_vm_ioctl_set_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)
>  {
> -	int r = 0, start = 0;
> +	int start = 0;
>  	u32 prev_legacy, cur_legacy;
>  	mutex_lock(&kvm->arch.vpit->pit_state.lock);
>  	prev_legacy = kvm->arch.vpit->pit_state.flags & KVM_PIT_FLAGS_HPET_LEGACY;
> @@ -3470,7 +3464,7 @@ static int kvm_vm_ioctl_set_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)
>  	kvm->arch.vpit->pit_state.flags = ps->flags;
>  	kvm_pit_load_count(kvm, 0, kvm->arch.vpit->pit_state.channels[0].count, start);
>  	mutex_unlock(&kvm->arch.vpit->pit_state.lock);
> -	return r;
> +	return 0;
>  }
>  
>  static int kvm_vm_ioctl_reinject(struct kvm *kvm,
> 

Applied, thanks.

Paolo

      reply	other threads:[~2015-11-02 12:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30  7:26 [PATCH] KVM: x86: removing unused variable Saurabh Sengar
2015-11-02 12:02 ` 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=563750BA.7040104@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=glen@nernel.org \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=saurabh.truth@gmail.com \
    --cc=tglx@linutronix.de \
    --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