diff options
author | Haiwei Li <lihaiwei@tencent.com> | 2020-01-16 16:50:21 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-27 19:59:56 +0100 |
commit | 17ac43a894ed3dd237d6def00c5ec2c7d975567e (patch) | |
tree | 5734e13dffaa306d544cf18c0e9f8c389a5e8880 /arch/x86/kvm/lapic.c | |
parent | b91991bf6b707482953c094dbd9615f6382ba2cb (diff) | |
download | lwn-17ac43a894ed3dd237d6def00c5ec2c7d975567e.tar.gz lwn-17ac43a894ed3dd237d6def00c5ec2c7d975567e.zip |
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>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r-- | arch/x86/kvm/lapic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 286396c0aa7d..cce1e6b204c8 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; } |