From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMqrU-0001hA-Hw for qemu-devel@nongnu.org; Tue, 12 Jul 2016 02:08:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMqrP-0004tX-81 for qemu-devel@nongnu.org; Tue, 12 Jul 2016 02:08:03 -0400 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]:35549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMqrP-0004tD-0E for qemu-devel@nongnu.org; Tue, 12 Jul 2016 02:07:59 -0400 Received: by mail-pa0-x244.google.com with SMTP id dx3so449008pab.2 for ; Mon, 11 Jul 2016 23:07:58 -0700 (PDT) References: <1468301160-3027-1-git-send-email-david@gibson.dropbear.id.au> From: Alexey Kardashevskiy Message-ID: <183a155e-a7ad-3f90-8bb9-9a29f3ae1061@ozlabs.ru> Date: Tue, 12 Jul 2016 16:07:51 +1000 MIME-Version: 1.0 In-Reply-To: <1468301160-3027-1-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vfio/spapr: Remove stale ioctl() call List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , pbonzini@redhat.com Cc: agraf@suse.de, alex.williamson@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 12/07/16 15:26, David Gibson wrote: > 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 > Signed-off-by: David Gibson Reviewed-by: Alexey Kardashevskiy > --- > hw/vfio/spapr.c | 1 - > 1 file changed, 1 deletion(-) > > Alexey, I've already put this tentatively into ppc-for-2.7, but I'd > appreciate an ack before I send my next pull request. > > diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c > index 0af3423..7443d34 100644 > --- a/hw/vfio/spapr.c > +++ b/hw/vfio/spapr.c > @@ -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, > -- Alexey