From nobody Wed Nov 5 05:30:15 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.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 Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529918402202775.8423648432159; Mon, 25 Jun 2018 02:20:02 -0700 (PDT) Received: from localhost ([::1]:44996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXNfF-0007n5-FJ for importer@patchew.org; Mon, 25 Jun 2018 05:20:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXNd2-0006ey-4B for qemu-devel@nongnu.org; Mon, 25 Jun 2018 05:17:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXNcw-0001bX-RK for qemu-devel@nongnu.org; Mon, 25 Jun 2018 05:17:43 -0400 Received: from 2.mo69.mail-out.ovh.net ([178.33.251.80]:38558) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fXNcw-0001aD-Kd for qemu-devel@nongnu.org; Mon, 25 Jun 2018 05:17:38 -0400 Received: from player789.ha.ovh.net (unknown [10.109.122.108]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id 1AF0D1A4AA for ; Mon, 25 Jun 2018 11:17:37 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-TOU-1-49-10.w86-201.abo.wanadoo.fr [86.201.141.10]) (Authenticated sender: clg@kaod.org) by player789.ha.ovh.net (Postfix) with ESMTPSA id 95C1D2600AE; Mon, 25 Jun 2018 11:17:31 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Mon, 25 Jun 2018 11:17:15 +0200 Message-Id: <20180625091718.18544-3-clg@kaod.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180625091718.18544-1-clg@kaod.org> References: <20180625091718.18544-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 12911820135736904678 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtiedrudefgddufecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd 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: 178.33.251.80 Subject: [Qemu-devel] [PATCH v2 2/5] ppc/xics: move the instance_init handler under the ics-base class 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: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Greg Kurz 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" Signed-off-by: C=C3=A9dric Le Goater --- hw/intc/xics.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index d6066d561fdc..83340770f7c0 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -611,13 +611,6 @@ static const VMStateDescription vmstate_ics_simple =3D= { }, }; =20 -static void ics_simple_initfn(Object *obj) -{ - ICSState *ics =3D ICS_SIMPLE(obj); - - ics->offset =3D XICS_IRQ_BASE; -} - static void ics_simple_realize(DeviceState *dev, Error **errp) { ICSState *ics =3D ICS_SIMPLE(dev); @@ -655,7 +648,6 @@ static const TypeInfo ics_simple_info =3D { .instance_size =3D sizeof(ICSState), .class_init =3D ics_simple_class_init, .class_size =3D sizeof(ICSStateClass), - .instance_init =3D ics_simple_initfn, }; =20 static void ics_base_realize(DeviceState *dev, Error **errp) @@ -679,6 +671,13 @@ static void ics_base_realize(DeviceState *dev, Error *= *errp) ics->irqs =3D g_malloc0(ics->nr_irqs * sizeof(ICSIRQState)); } =20 +static void ics_base_instance_init(Object *obj) +{ + ICSState *ics =3D ICS_BASE(obj); + + ics->offset =3D XICS_IRQ_BASE; +} + static Property ics_base_properties[] =3D { DEFINE_PROP_UINT32("nr-irqs", ICSState, nr_irqs, 0), DEFINE_PROP_END_OF_LIST(), @@ -697,6 +696,7 @@ static const TypeInfo ics_base_info =3D { .parent =3D TYPE_DEVICE, .abstract =3D true, .instance_size =3D sizeof(ICSState), + .instance_init =3D ics_base_instance_init, .class_init =3D ics_base_class_init, .class_size =3D sizeof(ICSStateClass), }; --=20 2.13.6