From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mm7ZQ-0003bw-Hk for qemu-devel@nongnu.org; Fri, 11 Sep 2009 10:57:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mm7ZK-0003YW-Cv for qemu-devel@nongnu.org; Fri, 11 Sep 2009 10:57:51 -0400 Received: from [199.232.76.173] (port=47994 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mm7ZK-0003YJ-2E for qemu-devel@nongnu.org; Fri, 11 Sep 2009 10:57:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2627) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mm7ZI-0001J6-Jf for qemu-devel@nongnu.org; Fri, 11 Sep 2009 10:57:45 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8BEvhk0004492 for ; Fri, 11 Sep 2009 10:57:43 -0400 Subject: Re: [Qemu-devel] [PATCH 1/8] qdev/pci: add pci_create_noinit() References: <1252672351-12937-1-git-send-email-kraxel@redhat.com> <1252672351-12937-2-git-send-email-kraxel@redhat.com> <87ws45d0vs.fsf@pike.pond.sub.org> <4AAA5EA5.7010205@redhat.com> From: Markus Armbruster Date: Fri, 11 Sep 2009 16:57:41 +0200 In-Reply-To: <4AAA5EA5.7010205@redhat.com> (Gerd Hoffmann's message of "Fri\, 11 Sep 2009 16\:28\:53 +0200") Message-ID: <874or9cyvu.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Gerd Hoffmann writes: >>> -PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name) >>> +PCIDevice *pci_create_noinit(PCIBus *bus, int devfn, const char *name) >>> { >>> DeviceState *dev; >>> >>> dev = qdev_create(&bus->qbus, name); >>> qdev_prop_set_uint32(dev, "addr", devfn); >>> - qdev_init(dev); >>> + return DO_UPCAST(PCIDevice, qdev, dev); >>> +} >> >> Okay, this is qdev_create() specialized for PCI. What about calling it >> just pci_create()? > > pci_create() should go away once it has no more users. It doesn't > accept a pcibus parameter as it should. I missed the fact that pci_create() already exists. That's a pity.