KVM: arm64: vgic: Remove duplicate check in update_affinity_collection()
authorGavin Shan <gshan@redhat.com>
Fri, 23 Sep 2022 06:54:47 +0000 (14:54 +0800)
committerMarc Zyngier <maz@kernel.org>
Mon, 26 Sep 2022 09:46:37 +0000 (10:46 +0100)
The 'coll' parameter to update_affinity_collection() is never NULL,
so comparing it with 'ite->collection' is enough to cover both
the NULL case and the "another collection" case.

Remove the duplicate check in update_affinity_collection().

Signed-off-by: Gavin Shan <gshan@redhat.com>
[maz: repainted commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220923065447.323445-1-gshan@redhat.com
arch/arm64/kvm/vgic/vgic-its.c

index 9d3299a70242399e18b09585e1c7a0936d04f6a2..24d7778d1ce63fd64315e545c1bb32e0a92a007c 100644 (file)
@@ -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);