public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: vgic: Remove duplicate check in update_affinity_collection()
@ 2022-09-23  6:54 Gavin Shan
  2022-09-24 11:56 ` Marc Zyngier
  2022-09-26  9:59 ` Marc Zyngier
  0 siblings, 2 replies; 5+ messages in thread
From: Gavin Shan @ 2022-09-23  6:54 UTC (permalink / raw)
  To: kvmarm; +Cc: linux-kernel, maz, will, eric.auger, yuzhe, oliver.upton,
	shan.gavin

The ITS collection is guranteed to be !NULL when update_affinity_collection()
is called. So we needn't check ITE's collection with NULL because the
check has been included to the later one.

Remove the duplicate check in update_affinity_collection().

Signed-off-by: Gavin Shan <gshan@redhat.com>
---
 arch/arm64/kvm/vgic/vgic-its.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 9d3299a70242..24d7778d1ce6 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -406,7 +406,7 @@ static void update_affinity_collection(struct kvm *kvm, struct vgic_its *its,
 	struct its_ite *ite;
 
 	for_each_lpi_its(device, ite, its) {
-		if (!ite->collection || coll != ite->collection)
+		if (ite->collection != coll)
 			continue;
 
 		update_affinity_ite(kvm, ite);
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-26  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-23  6:54 [PATCH] KVM: arm64: vgic: Remove duplicate check in update_affinity_collection() Gavin Shan
2022-09-24 11:56 ` Marc Zyngier
2022-09-25 23:21   ` Gavin Shan
2022-09-26  9:45     ` Marc Zyngier
2022-09-26  9:59 ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox