]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vfio/spapr: Remove stale ioctl() call
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 12 Jul 2016 06:54:03 +0000 (16:54 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 18 Jul 2016 00:40:27 +0000 (10:40 +1000)
This ioctl() call to VFIO_IOMMU_SPAPR_TCE_REMOVE was left over from an
earlier version of the code and has since been folded into
vfio_spapr_remove_window().

It wasn't caught because although the argument structure has been removed,
the libc function remove() means this didn't trigger a compile failure.
The ioctl() was also almost certain to fail silently and harmlessly with
the bogus argument, so this wasn't caught in testing.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
hw/vfio/spapr.c

index 0af342332c71a81c5cd068f38dae056cf6e4d3fe..7443d348d97e7dd1800284d7e2535cc442d7c111 100644 (file)
@@ -177,7 +177,6 @@ int vfio_spapr_create_window(VFIOContainer *container,
         error_report("Host doesn't support DMA window at %"HWADDR_PRIx", must be %"PRIx64,
                      section->offset_within_address_space,
                      (uint64_t)create.start_addr);
-        ioctl(container->fd, VFIO_IOMMU_SPAPR_TCE_REMOVE, &remove);
         return -EINVAL;
     }
     trace_vfio_spapr_create_window(create.page_shift,