qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 06/13] convert pci bridge to qdev


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 06/13] convert pci bridge to qdev
Date: Fri, 25 Sep 2009 09:19:10 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3

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"<address@hidden>  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]