Received: from eggs.gnu.org ([208.118.235.92]:38606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5m5G-0004jH-8W for qemu-devel@nongnu.org; Sun, 26 Aug 2012 19:17:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T5m5F-0003da-Ge for qemu-devel@nongnu.org; Sun, 26 Aug 2012 19:17:34 -0400 Received: from cpe-70-123-140-180.austin.res.rr.com ([70.123.140.180]:50521 helo=localhost6.localdomain6) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T5m5F-0003cZ-9Z for qemu-devel@nongnu.org; Sun, 26 Aug 2012 19:17:33 -0400 From: Anthony Liguori Date: Sun, 26 Aug 2012 10:51:33 -0500 Message-Id: <1345996298-4892-5-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1345996298-4892-1-git-send-email-aliguori@us.ibm.com> References: <1345996298-4892-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 4/9] object: remove object_finalize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Anthony Liguori , Liu Ping Fan , Andreas Faerber Callers should just use object_unref Signed-off-by: Anthony Liguori --- hw/qdev.c | 4 ---- include/qemu/object.h | 9 --------- qom/object.c | 2 +- 3 files changed, 1 insertions(+), 14 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 6b61daa..fdee91f 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -678,13 +678,9 @@ static void device_initfn(Object *obj) static void device_finalize(Object *obj) { DeviceState *dev = DEVICE(obj); - BusState *bus; DeviceClass *dc = DEVICE_GET_CLASS(dev); if (dev->state == DEV_STATE_INITIALIZED) { - while (dev->num_child_bus) { - bus = QLIST_FIRST(&dev->child_bus); - } if (qdev_get_vmsd(dev)) { vmstate_unregister(dev, qdev_get_vmsd(dev), dev); } diff --git a/include/qemu/object.h b/include/qemu/object.h index 487adcd..8bc9935 100644 --- a/include/qemu/object.h +++ b/include/qemu/object.h @@ -490,15 +490,6 @@ void object_initialize_with_type(void *data, Type type); void object_initialize(void *obj, const char *typename); /** - * object_finalize: - * @obj: The object to finalize. - * - * This function destroys and object without freeing the memory associated with - * it. - */ -void object_finalize(void *obj); - -/** * object_dynamic_cast: * @obj: The object to cast. * @typename: The @typename to cast to. diff --git a/qom/object.c b/qom/object.c index 44135c3..1144f79 100644 --- a/qom/object.c +++ b/qom/object.c @@ -375,7 +375,7 @@ static void object_deinit(Object *obj, TypeImpl *type) } } -void object_finalize(void *data) +static void object_finalize(void *data) { Object *obj = data; TypeImpl *ti = obj->class->type; -- 1.7.5.4