Received: from eggs.gnu.org ([2001:4830:134:3::10]:54787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgSJx-0005Nm-5y for qemu-devel@nongnu.org; Mon, 28 Sep 2015 02:53:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgSJu-0007o9-0e for qemu-devel@nongnu.org; Mon, 28 Sep 2015 02:53:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgSJt-0007o3-S5 for qemu-devel@nongnu.org; Mon, 28 Sep 2015 02:53:53 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 4F37991C05 for ; Mon, 28 Sep 2015 06:53:53 +0000 (UTC) From: Markus Armbruster References: <20150925170351.22650.92245.stgit@gimli.home> <20150925170704.22650.6259.stgit@gimli.home> Date: Mon, 28 Sep 2015 08:53:50 +0200 In-Reply-To: <20150925170704.22650.6259.stgit@gimli.home> (Alex Williamson's message of "Fri, 25 Sep 2015 11:07:15 -0600") Message-ID: <87612vnif5.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PULL 1/1] vfio/pci: Remove use of g_malloc0_n() from quirks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: qemu-devel@nongnu.org Alex Williamson writes: > For compatibility with glib 2.22. > > Reported-by: Wen Congyang > Signed-off-by: Alex Williamson > --- > hw/vfio/pci-quirks.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c > index 2bdaef1..c675d1b 100644 > --- a/hw/vfio/pci-quirks.c > +++ b/hw/vfio/pci-quirks.c > @@ -284,7 +284,7 @@ static void vfio_vga_probe_ati_3c3_quirk(VFIOPCIDevice *vdev) > } > > quirk = g_malloc0(sizeof(*quirk)); > - quirk->mem = g_malloc0_n(sizeof(MemoryRegion), 1); > + quirk->mem = g_malloc0(sizeof(MemoryRegion)); > quirk->nr_mem = 1; > > memory_region_init_io(quirk->mem, OBJECT(vdev), &vfio_ati_3c3_quirk, vdev, g_new0(MemoryRegion, 1) is a bit neater. Followup patch coming. [...]