[Qemu-devel] [PATCH] qdev: rename qdev_free() to qdev_unparent()

2013-09-11 Thread Stefan Hajnoczi
The qdev_free() function name is misleading since all the function does is unlink the device from its parent. The device is not necessarily freed. The device will be freed when its QObject refcount reaches zero. It is usual for the parent (bus) to hold the final reference but there are cases

Re: [Qemu-devel] [PATCH] qdev: rename qdev_free() to qdev_unparent()

2013-09-11 Thread Paolo Bonzini
Il 11/09/2013 09:45, Stefan Hajnoczi ha scritto: The qdev_free() function name is misleading since all the function does is unlink the device from its parent. The device is not necessarily freed. The device will be freed when its QObject refcount reaches zero. It is usual for the parent

Re: [Qemu-devel] [PATCH] qdev: rename qdev_free() to qdev_unparent()

2013-09-11 Thread Andreas Färber
Am 11.09.2013 09:45, schrieb Stefan Hajnoczi: The qdev_free() function name is misleading since all the function does is unlink the device from its parent. The device is not necessarily freed. The device will be freed when its QObject refcount reaches zero. It is usual for the parent

Re: [Qemu-devel] [PATCH] qdev: rename qdev_free() to qdev_unparent()

2013-09-11 Thread Stefan Hajnoczi
On Wed, Sep 11, 2013 at 10:23 AM, Andreas Färber afaer...@suse.de wrote: Am 11.09.2013 09:45, schrieb Stefan Hajnoczi: diff --git a/hw/pci/pci-hotplug-old.c b/hw/pci/pci-hotplug-old.c index 619fe47..f197f5f 100644 --- a/hw/pci/pci-hotplug-old.c +++ b/hw/pci/pci-hotplug-old.c @@ -248,7 +248,7