All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jiang Biao <jiang.biao2@zte.com.cn>, kvm@vger.kernel.org
Cc: rkrcmar@redhat.com, zhong.weidong@zte.com.cn
Subject: Re: [PATCH] kvm: x86: remove unused but set variable
Date: Wed, 9 Nov 2016 00:17:12 +0100	[thread overview]
Message-ID: <6884be2e-b98e-af72-ef4a-6cc06363d591@redhat.com> (raw)
In-Reply-To: <1478480236-26038-1-git-send-email-jiang.biao2@zte.com.cn>



On 07/11/2016 01:57, Jiang Biao wrote:
> The local variable *gpa_offset* is set but not used afterwards,
> which make the compiler issue a warning with option
> -Wunused-but-set-variable. Remove it to avoid the warning.
> 
> Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
> ---
>  arch/x86/kvm/x86.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index cfd916c..a55d024 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -2162,7 +2162,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
>  		break;
>  	case MSR_KVM_SYSTEM_TIME_NEW:
>  	case MSR_KVM_SYSTEM_TIME: {
> -		u64 gpa_offset;
>  		struct kvm_arch *ka = &vcpu->kvm->arch;
>  
>  		kvmclock_reset(vcpu);
> @@ -2184,8 +2183,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
>  		if (!(data & 1))
>  			break;
>  
> -		gpa_offset = data & ~(PAGE_MASK | 1);
> -
>  		if (kvm_gfn_to_hva_cache_init(vcpu->kvm,
>  		     &vcpu->arch.pv_time, data & ~1ULL,
>  		     sizeof(struct pvclock_vcpu_time_info)))
> 

Applied all four, thanks.

Paolo

      reply	other threads:[~2016-11-08 23:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07  0:57 [PATCH] kvm: x86: remove unused but set variable Jiang Biao
2016-11-08 23:17 ` 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=6884be2e-b98e-af72-ef4a-6cc06363d591@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jiang.biao2@zte.com.cn \
    --cc=kvm@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=zhong.weidong@zte.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.