From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsvdS-0003rl-91 for qemu-devel@nongnu.org; Wed, 09 Jan 2013 08:24:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsvdR-0000MQ-8F for qemu-devel@nongnu.org; Wed, 09 Jan 2013 08:24:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsvdR-0000MM-0g for qemu-devel@nongnu.org; Wed, 09 Jan 2013 08:24:01 -0500 Message-ID: <50ED6F6D.3020005@redhat.com> Date: Wed, 09 Jan 2013 14:23:57 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1354740282-20679-1-git-send-email-pbonzini@redhat.com> <1354740282-20679-5-git-send-email-pbonzini@redhat.com> <87hamsg2nr.fsf@codemonkey.ws> In-Reply-To: <87hamsg2nr.fsf@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 04/11] qdev: add reference count to a device for the BusChild List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, afaerber@suse.de Il 07/01/2013 21:26, Anthony Liguori ha scritto: >> > + object_ref(OBJECT(kid->child)); >> > >> > QTAILQ_INSERT_HEAD(&bus->children, kid, sibling); >> > >> > + /* This transfers ownership of kid->child to the property. */ >> > snprintf(name, sizeof(name), "child[%d]", kid->index); >> > object_property_add_link(OBJECT(bus), name, >> > object_get_typename(OBJECT(child)), > > The link property itself holds a reference no? Or is this not the case > because we aren't checking a link when it's added and taking a reference > if it's !NULL? Yes. I think it's okay this way though, and anyway a separate series that would touch all object_property_add_link callers. Paolo