kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Haiwei Li <lihaiwei.kernel@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>,
	"vkuznets@redhat.com" <vkuznets@redhat.com>,
	"wanpengli@tencent.com" <wanpengli@tencent.com>,
	"jmattson@google.com" <jmattson@google.com>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>, "hpa@zytor.com" <hpa@zytor.com>
Subject: Re: [PATCH v2] KVM: Adding 'else' to reduce checking.
Date: Tue, 21 Jan 2020 13:15:32 +0100	[thread overview]
Message-ID: <68afcc3a-f32c-0e0e-5c2d-5fddfc98d1fd@redhat.com> (raw)
In-Reply-To: <abea81a5-266f-7e0d-558a-b4b7aa49d3d4@gmail.com>

On 16/01/20 10:03, Haiwei Li wrote:
> From 009bfba9b6f6b41018708323d9ca651ae2075900 Mon Sep 17 00:00:00 2001
> From: Haiwei Li <lihaiwei@tencent.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@tencent.com>
> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> Reviewed-by: Miaohe Lin <linmiaohe@huawei.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


      reply	other threads:[~2020-01-21 12:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  9:03 [PATCH v2] KVM: Adding 'else' to reduce checking Haiwei Li
2020-01-21 12:15 ` 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=68afcc3a-f32c-0e0e-5c2d-5fddfc98d1fd@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=lihaiwei.kernel@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.org \
    /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).