linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Huacai Chen <chenhuacai@loongson.cn>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: kvm@vger.kernel.org, linux-mips@vger.kernel.org,
	Huacai Chen <chenhuacai@gmail.com>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] KVM: MIPS: Remove a "set but not used" variable
Date: Fri, 14 May 2021 11:58:06 +0200	[thread overview]
Message-ID: <e55e632d-a138-a6ec-d545-299ab858a163@redhat.com> (raw)
In-Reply-To: <20210406024911.2008046-1-chenhuacai@loongson.cn>

On 06/04/21 04:49, Huacai Chen wrote:
> This fix a build warning:
> 
>     arch/mips/kvm/vz.c: In function '_kvm_vz_restore_htimer':
>>> arch/mips/kvm/vz.c:392:10: warning: variable 'freeze_time' set but not used [-Wunused-but-set-variable]
>       392 |  ktime_t freeze_time;
>           |          ^~~~~~~~~~~
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
>   arch/mips/kvm/vz.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/mips/kvm/vz.c b/arch/mips/kvm/vz.c
> index d0d03bddbbba..e81dfdf7309e 100644
> --- a/arch/mips/kvm/vz.c
> +++ b/arch/mips/kvm/vz.c
> @@ -388,7 +388,6 @@ static void _kvm_vz_restore_htimer(struct kvm_vcpu *vcpu,
>   				   u32 compare, u32 cause)
>   {
>   	u32 start_count, after_count;
> -	ktime_t freeze_time;
>   	unsigned long flags;
>   
>   	/*
> @@ -396,7 +395,7 @@ static void _kvm_vz_restore_htimer(struct kvm_vcpu *vcpu,
>   	 * this with interrupts disabled to avoid latency.
>   	 */
>   	local_irq_save(flags);
> -	freeze_time = kvm_mips_freeze_hrtimer(vcpu, &start_count);
> +	kvm_mips_freeze_hrtimer(vcpu, &start_count);
>   	write_c0_gtoffset(start_count - read_c0_count());
>   	local_irq_restore(flags);
>   
> 

Queued, thanks.

Paolo


  parent reply	other threads:[~2021-05-14  9:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  2:49 [PATCH] KVM: MIPS: Remove a "set but not used" variable Huacai Chen
2021-05-14  9:50 ` Huacai Chen
2021-05-14  9:58 ` Paolo Bonzini [this message]
2021-09-01  8:32   ` Huacai Chen

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=e55e632d-a138-a6ec-d545-299ab858a163@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=chenhuacai@gmail.com \
    --cc=chenhuacai@loongson.cn \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=tsbogend@alpha.franken.de \
    /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;
as well as URLs for NNTP newsgroup(s).