[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <68afcc3a-f32c-0e0e-5c2d-5fddfc98d1fd@redhat.com>
Date: Tue, 21 Jan 2020 13:15:32 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Haiwei Li <lihaiwei.kernel@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>
Cc: Sean Christopherson <sean.j.christopherson@...el.com>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"wanpengli@...cent.com" <wanpengli@...cent.com>,
"jmattson@...gle.com" <jmattson@...gle.com>,
"joro@...tes.org" <joro@...tes.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>
Subject: Re: [PATCH v2] KVM: Adding 'else' to reduce checking.
On 16/01/20 10:03, Haiwei Li wrote:
> From 009bfba9b6f6b41018708323d9ca651ae2075900 Mon Sep 17 00:00:00 2001
> From: Haiwei Li <lihaiwei@...cent.com>
> Date: Thu, 16 Jan 2020 16:50:21 +0800
> Subject: [PATCH] Adding 'else' to reduce checking.
>
> These two conditions are in conflict, adding 'else' to reduce checking.
>
> Signed-off-by: Haiwei Li <lihaiwei@...cent.com>
> Reviewed-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> Reviewed-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
> arch/x86/kvm/lapic.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 679692b..f1cfb94 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1571,9 +1571,9 @@ static void
> kvm_apic_inject_pending_timer_irqs(struct kvm_lapic *apic)
> struct kvm_timer *ktimer = &apic->lapic_timer;
>
> kvm_apic_local_deliver(apic, APIC_LVTT);
> - if (apic_lvtt_tscdeadline(apic))
> + if (apic_lvtt_tscdeadline(apic)) {
> ktimer->tscdeadline = 0;
> - if (apic_lvtt_oneshot(apic)) {
> + } else if (apic_lvtt_oneshot(apic)) {
> ktimer->tscdeadline = 0;
> ktimer->target_expiration = 0;
> }
> --
> 1.8.3.1
>
Queued, thanks.
Paolo
Powered by blists - more mailing lists