]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
KVM: arm/arm64: vgic-its: Remove kvm_its_unmap_device
authorEric Auger <eric.auger@redhat.com>
Thu, 26 Oct 2017 15:23:07 +0000 (17:23 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Mon, 6 Nov 2017 15:23:18 +0000 (16:23 +0100)
Let's remove kvm_its_unmap_device and use kvm_its_free_device
as both functions are identical.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/vgic/vgic-its.c

index 9f5e34767628444175e331f695ac1d51847ae0db..75c18183eee37232243bcc83d5d83d1f47b592a3 100644 (file)
@@ -897,7 +897,7 @@ static int vgic_its_cmd_handle_mapi(struct kvm *kvm, struct vgic_its *its,
 }
 
 /* Requires the its_lock to be held. */
-static void vgic_its_unmap_device(struct kvm *kvm, struct its_device *device)
+static void vgic_its_free_device(struct kvm *kvm, struct its_device *device)
 {
        struct its_ite *ite, *temp;
 
@@ -960,7 +960,7 @@ static int vgic_its_cmd_handle_mapd(struct kvm *kvm, struct vgic_its *its,
         * by removing the mapping and re-establishing it.
         */
        if (device)
-               vgic_its_unmap_device(kvm, device);
+               vgic_its_free_device(kvm, device);
 
        /*
         * The spec does not say whether unmapping a not-mapped device
@@ -1615,16 +1615,6 @@ static int vgic_its_create(struct kvm_device *dev, u32 type)
        return vgic_its_set_abi(its, NR_ITS_ABIS - 1);
 }
 
-static void vgic_its_free_device(struct kvm *kvm, struct its_device *dev)
-{
-       struct its_ite *ite, *tmp;
-
-       list_for_each_entry_safe(ite, tmp, &dev->itt_head, ite_list)
-               its_free_ite(kvm, ite);
-       list_del(&dev->dev_list);
-       kfree(dev);
-}
-
 static void vgic_its_destroy(struct kvm_device *kvm_dev)
 {
        struct kvm *kvm = kvm_dev->kvm;