From nobody Tue Feb 10 09:02:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528800637280800.4545586931924; Tue, 12 Jun 2018 03:50:37 -0700 (PDT) Received: from localhost ([::1]:54412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSgsm-000723-Ey for importer@patchew.org; Tue, 12 Jun 2018 06:50:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSgn1-0002og-U8 for qemu-devel@nongnu.org; Tue, 12 Jun 2018 06:44:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSgn1-0007wr-0G for qemu-devel@nongnu.org; Tue, 12 Jun 2018 06:44:39 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49314 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fSgmv-0007r0-0Q; Tue, 12 Jun 2018 06:44:33 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4144177886; Tue, 12 Jun 2018 10:44:32 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-109.ams2.redhat.com [10.36.116.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25B862024CA2; Tue, 12 Jun 2018 10:44:31 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8FA50409E4; Tue, 12 Jun 2018 12:44:30 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 12 Jun 2018 12:44:26 +0200 Message-Id: <20180612104430.25745-5-kraxel@redhat.com> In-Reply-To: <20180612104430.25745-1-kraxel@redhat.com> References: <20180612104430.25745-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 12 Jun 2018 10:44:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 12 Jun 2018 10:44:32 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 4/8] bus: do not unref the added child bus on realize X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard , Peter Maydell , Alistair Francis , Eduardo Habkost , Li Zhijian , Peter Crosthwaite , Jason Wang , Zhang Chen , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, "Michael S. Tsirkin" , Gerd Hoffmann , "Edgar E. Iglesias" , Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau When the parent bus removes the child property, it takes care of removing the added reference, in object_finalize_child_property(). Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20180531195119.22021-2-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- hw/core/bus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/bus.c b/hw/core/bus.c index 4651f24486..ad0c9df335 100644 --- a/hw/core/bus.c +++ b/hw/core/bus.c @@ -102,7 +102,6 @@ static void qbus_realize(BusState *bus, DeviceState *pa= rent, const char *name) QLIST_INSERT_HEAD(&bus->parent->child_bus, bus, sibling); bus->parent->num_child_bus++; object_property_add_child(OBJECT(bus->parent), bus->name, OBJECT(b= us), NULL); - object_unref(OBJECT(bus)); } else if (bus !=3D sysbus_get_default()) { /* TODO: once all bus devices are qdevified, only reset handler for main_system_bus should be registered her= e. */ --=20 2.9.3