From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mr55X-000761-2o for qemu-devel@nongnu.org; Fri, 25 Sep 2009 03:19:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mr55S-00075o-Dj for qemu-devel@nongnu.org; Fri, 25 Sep 2009 03:19:30 -0400 Received: from [199.232.76.173] (port=54169 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mr55S-00075l-8C for qemu-devel@nongnu.org; Fri, 25 Sep 2009 03:19:26 -0400 Received: from mx20.gnu.org ([199.232.41.8]:27985) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mr55R-0004j7-Rh for qemu-devel@nongnu.org; Fri, 25 Sep 2009 03:19:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mr55Q-0005YO-8I for qemu-devel@nongnu.org; Fri, 25 Sep 2009 03:19:24 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8P7JMLa026417 for ; Fri, 25 Sep 2009 03:19:22 -0400 Message-ID: <4ABC6EEE.6000705@redhat.com> Date: Fri, 25 Sep 2009 09:19:10 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 06/13] convert pci bridge to qdev References: <1253611767-6483-1-git-send-email-kraxel@redhat.com> <1253611767-6483-7-git-send-email-kraxel@redhat.com> <20090923160200.GC18203@redhat.com> <87skecb3h7.fsf@pike.pond.sub.org> <20090924185101.GA29419@redhat.com> In-Reply-To: <20090924185101.GA29419@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Markus Armbruster , qemu-devel@nongnu.org On 09/24/09 20:51, Michael S. Tsirkin wrote: > On Thu, Sep 24, 2009 at 08:29:56PM +0200, Markus Armbruster wrote: >> "Michael S. Tsirkin" writes: >> >>> On Tue, Sep 22, 2009 at 11:29:20AM +0200, Gerd Hoffmann wrote: >>>> @@ -890,15 +890,12 @@ PCIDevice *pci_find_device(int bus_num, int slot, int function) >>>> return bus->devices[PCI_DEVFN(slot, function)]; >>>> } >>>> >>>> -PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did, >>>> - pci_map_irq_fn map_irq, const char *name) >>>> +static int pci_bridge_initfn(PCIDevice *dev) >>> >>> pci_bridge_dev_init a better name? >> >> There's precedence for _initfn, _init1, and _init. I wish we'd pick one >> convention and stick to it. > > The problem here is that we now have *both* pci_bridge_init and > pci_bridge_initfn. > >> [...] There are quite a few places which are simliar named. *_initfn is the qdev init callback, *_init is the convenience wrapper to keep the old code paths working, which ideally just does qdev_create() + set properties + qdev_init(). We are not there (yet) in all cases though. cheers, Gerd