mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Deming Wang <wangdeming@inspur.com>
To: <seanjc@google.com>, <pbonzini@redhat.com>, <tglx@linutronix.de>,
	<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>,
	<x86@kernel.org>
Cc: <hpa@zytor.com>, <kvm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Deming Wang <wangdeming@inspur.com>
Subject: [PATCH] KVM: LAPIC: Separate the variable declaration and code logic
Date: Sun, 3 Jul 2022 00:54:10 -0400	[thread overview]
Message-ID: <20220703045410.9159-1-wangdeming@inspur.com> (raw)

The function apic_has_interrupt_for_ppr and the function
kvm_apic_is_broadcast_dest should follow the same style as other codes.

Signed-off-by: Deming Wang <wangdeming@inspur.com>
---
 arch/x86/kvm/lapic.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index f03facc2ee3e..d8940486878d 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -739,12 +739,14 @@ static bool pv_eoi_test_and_clr_pending(struct kvm_vcpu *vcpu)
 static int apic_has_interrupt_for_ppr(struct kvm_lapic *apic, u32 ppr)
 {
 	int highest_irr;
+
 	if (kvm_x86_ops.sync_pir_to_irr)
 		highest_irr = static_call(kvm_x86_sync_pir_to_irr)(apic->vcpu);
 	else
 		highest_irr = apic_find_highest_irr(apic);
 	if (highest_irr == -1 || (highest_irr & 0xF0) <= ppr)
 		return -1;
+
 	return highest_irr;
 }
 
@@ -932,6 +934,7 @@ static bool kvm_apic_is_broadcast_dest(struct kvm *kvm, struct kvm_lapic **src,
 			return true;
 	} else {
 		bool x2apic_ipi = src && *src && apic_x2apic_mode(*src);
+
 		if (irq->dest_id == (x2apic_ipi ?
 		                     X2APIC_BROADCAST : APIC_BROADCAST))
 			return true;
-- 
2.27.0


                 reply	other threads:[~2022-07-06  9:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220703045410.9159-1-wangdeming@inspur.com \
    --to=wangdeming@inspur.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --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

all inboxes | Powered by JetHome®