From nobody Tue Feb 10 12:39:29 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; dkim=fail; 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513318384458980.5591819502331; Thu, 14 Dec 2017 22:13:04 -0800 (PST) Received: from localhost ([::1]:44691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePjEg-0002jW-Cj for importer@patchew.org; Fri, 15 Dec 2017 01:12:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePixS-0003iB-0M for qemu-devel@nongnu.org; Fri, 15 Dec 2017 00:54:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePixQ-0004n7-2U for qemu-devel@nongnu.org; Fri, 15 Dec 2017 00:54:54 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:39439) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ePixP-0004if-Dw; Fri, 15 Dec 2017 00:54:51 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3yyflS6fj0z9tD8; Fri, 15 Dec 2017 16:54:43 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1513317284; bh=wNVyeUnUyOBoJJgFoLUjy0TPx4pUrFAvlsAzYUsujKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i1Bj2fOU6V0nD5Yqr1841kq8Dld1lVrduImq1cB2cx0WVQPMhToz+7tmZ+ERvPPpV 2S9sFqjsYpC5M2SGUYxqKI4305nFscqXUn/ctX4Mw2B80Qhr+BV1K8ANKpIGOE39+o JcVfJYyp+GnbfO9wzRRRvkZSpmrO5GzTcOoq16yA= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 15 Dec 2017 16:54:33 +1100 Message-Id: <20171215055435.24204-23-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171215055435.24204-1-david@gibson.dropbear.id.au> References: <20171215055435.24204-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 22/24] spapr: Rename machine init functions for clarity 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: lvivier@redhat.com, agraf@suse.de, mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Machine objects have two init functions - the generic QOM level instance_init which should only do static object initialization, and the Machine specific MachineClass::init which does the actual construction of the machine. In spapr the functions implementing these two have names - ppc_machine_initfn() and ppc_spapr_init() - which don't correspond closely to either of those. To prevent people (read, me) from confusing which is which, rename them spapr_instance_init() and spapr_machine_init() to make it clearer which is which. While we're there rename ppc_spapr_reset() to spapr_machine_reset() to match. Signed-off-by: David Gibson Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Suraj Jitindar Singh --- hw/ppc/spapr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 306875e123..42d6a2302a 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1454,7 +1454,7 @@ static int spapr_reset_drcs(Object *child, void *opaq= ue) return 0; } =20 -static void ppc_spapr_reset(void) +static void spapr_machine_reset(void) { MachineState *machine =3D MACHINE(qdev_get_machine()); sPAPRMachineState *spapr =3D SPAPR_MACHINE(machine); @@ -2292,7 +2292,7 @@ out: } =20 /* pSeries LPAR / sPAPR hardware init */ -static void ppc_spapr_init(MachineState *machine) +static void spapr_machine_init(MachineState *machine) { sPAPRMachineState *spapr =3D SPAPR_MACHINE(machine); sPAPRMachineClass *smc =3D SPAPR_MACHINE_GET_CLASS(machine); @@ -2820,7 +2820,7 @@ static void spapr_set_vsmt(Object *obj, Visitor *v, c= onst char *name, visit_type_uint32(v, name, (uint32_t *)opaque, errp); } =20 -static void spapr_machine_initfn(Object *obj) +static void spapr_instance_init(Object *obj) { sPAPRMachineState *spapr =3D SPAPR_MACHINE(obj); =20 @@ -3777,8 +3777,8 @@ static void spapr_machine_class_init(ObjectClass *oc,= void *data) * functions for the specific versioned machine types can override * these details for backwards compatibility */ - mc->init =3D ppc_spapr_init; - mc->reset =3D ppc_spapr_reset; + mc->init =3D spapr_machine_init; + mc->reset =3D spapr_machine_reset; mc->block_default_type =3D IF_SCSI; mc->max_cpus =3D 1024; mc->no_parallel =3D 1; @@ -3825,7 +3825,7 @@ static const TypeInfo spapr_machine_info =3D { .parent =3D TYPE_MACHINE, .abstract =3D true, .instance_size =3D sizeof(sPAPRMachineState), - .instance_init =3D spapr_machine_initfn, + .instance_init =3D spapr_instance_init, .instance_finalize =3D spapr_machine_finalizefn, .class_size =3D sizeof(sPAPRMachineClass), .class_init =3D spapr_machine_class_init, --=20 2.14.3