From nobody Wed Nov 5 17:46:08 2025 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.zoho.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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496856778734977.4389426910573; Wed, 7 Jun 2017 10:32:58 -0700 (PDT) Received: from localhost ([::1]:45415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIepC-0006cy-Sz for importer@patchew.org; Wed, 07 Jun 2017 13:32:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIeZp-0000Nz-OQ for qemu-devel@nongnu.org; Wed, 07 Jun 2017 13:17:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIeZl-0000TO-Nx for qemu-devel@nongnu.org; Wed, 07 Jun 2017 13:17:01 -0400 Received: from 4.mo178.mail-out.ovh.net ([46.105.49.171]:53108) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIeZl-0000RY-HZ for qemu-devel@nongnu.org; Wed, 07 Jun 2017 13:16:57 -0400 Received: from player728.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id ABB943D100 for ; Wed, 7 Jun 2017 19:16:55 +0200 (CEST) Received: from bahia.lan (gar31-1-82-66-74-139.fbx.proxad.net [82.66.74.139]) (Authenticated sender: groug@kaod.org) by player728.ha.ovh.net (Postfix) with ESMTPA id 6F008540096; Wed, 7 Jun 2017 19:16:52 +0200 (CEST) From: Greg Kurz To: qemu-devel@nongnu.org Date: Wed, 07 Jun 2017 19:16:52 +0200 Message-ID: <149685581222.12025.5541302490723329093.stgit@bahia.lan> In-Reply-To: <149685579678.12025.9278446121024037161.stgit@bahia.lan> References: <149685579678.12025.9278446121024037161.stgit@bahia.lan> User-Agent: StGit/0.17.1-20-gc0b1b-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 3821022809097279974 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeljedriedugdduuddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 46.105.49.171 Subject: [Qemu-devel] [PATCH v3 1/5] pnv_core: drop reference on ICPState object during CPU realization 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: qemu-ppc@nongnu.org, Cedric Le Goater , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Similarly to what was done to spapr with commit 249127d0dfeb, this patch ensures that we don't keep an extra reference on the ICPState object. Also since the object was just created and not reparented yet, the call to object_property_add_child() should never fail: let's pass &error_abort to make this clear. Signed-off-by: Greg Kurz Reviewed-by: C=C3=A9dric Le Goater --- hw/ppc/pnv_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index 1b7ec70f033d..e8a9a94d5a24 100644 --- a/hw/ppc/pnv_core.c +++ b/hw/ppc/pnv_core.c @@ -119,7 +119,8 @@ static void pnv_core_realize_child(Object *child, XICSF= abric *xi, Error **errp) Object *obj; =20 obj =3D object_new(TYPE_PNV_ICP); - object_property_add_child(OBJECT(cpu), "icp", obj, NULL); + object_property_add_child(OBJECT(cpu), "icp", obj, &error_abort); + object_unref(obj); object_property_add_const_link(obj, "xics", OBJECT(xi), &error_abort); object_property_set_bool(obj, true, "realized", &local_err); if (local_err) {