Thread (4 messages) 4 messages, 3 authors, 2021-09-01

Re: [PATCH] KVM: MIPS: Remove a "set but not used" variable

From: Huacai Chen <hidden>
Date: 2021-09-01 08:32:39
Also in: kvm

Hi, Paolo,

On Fri, May 14, 2021 at 5:58 PM Paolo Bonzini [off-list ref] wrote:
On 06/04/21 04:49, Huacai Chen wrote:
quoted
This fix a build warning:

    arch/mips/kvm/vz.c: In function '_kvm_vz_restore_htimer':
quoted
quoted
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 <redacted>
Signed-off-by: Huacai Chen <redacted>
---
  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.
LKP reminds me again and again :)

Huacai
Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help