* [PATCH] KVM: MIPS: Remove a "set but not used" variable
@ 2021-04-06 2:49 Huacai Chen
2021-05-14 9:50 ` Huacai Chen
2021-05-14 9:58 ` Paolo Bonzini
0 siblings, 2 replies; 4+ messages in thread
From: Huacai Chen @ 2021-04-06 2:49 UTC (permalink / raw)
To: Paolo Bonzini, Thomas Bogendoerfer
Cc: kvm, linux-mips, Huacai Chen, Jiaxun Yang, Huacai Chen,
kernel test robot
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);
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: MIPS: Remove a "set but not used" variable
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
1 sibling, 0 replies; 4+ messages in thread
From: Huacai Chen @ 2021-05-14 9:50 UTC (permalink / raw)
To: Huacai Chen
Cc: Paolo Bonzini, Thomas Bogendoerfer, kvm, open list:MIPS,
Jiaxun Yang, kernel test robot
ping
On Tue, Apr 6, 2021 at 10:48 AM Huacai Chen <chenhuacai@loongson.cn> 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);
>
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: MIPS: Remove a "set but not used" variable
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
2021-09-01 8:32 ` Huacai Chen
1 sibling, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2021-05-14 9:58 UTC (permalink / raw)
To: Huacai Chen, Thomas Bogendoerfer
Cc: kvm, linux-mips, Huacai Chen, Jiaxun Yang, kernel test robot
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: MIPS: Remove a "set but not used" variable
2021-05-14 9:58 ` Paolo Bonzini
@ 2021-09-01 8:32 ` Huacai Chen
0 siblings, 0 replies; 4+ messages in thread
From: Huacai Chen @ 2021-09-01 8:32 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Huacai Chen, Thomas Bogendoerfer, kvm, open list:MIPS,
Jiaxun Yang, kernel test robot
Hi, Paolo,
On Fri, May 14, 2021 at 5:58 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> 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.
LKP reminds me again and again :)
Huacai
>
> Paolo
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-01 8:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-09-01 8:32 ` Huacai Chen
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.