From nobody Thu Nov 6 10:26:54 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540466404149447.8970622486528; Thu, 25 Oct 2018 04:20:04 -0700 (PDT) Received: from localhost ([::1]:53811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFdgJ-00032Y-0Z for importer@patchew.org; Thu, 25 Oct 2018 07:20:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFda0-0006fU-Qj for qemu-devel@nongnu.org; Thu, 25 Oct 2018 07:13:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFdZj-0000n7-Oy for qemu-devel@nongnu.org; Thu, 25 Oct 2018 07:13:24 -0400 Received: from mxhk.zte.com.cn ([63.217.80.70]:9358) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gFdZM-0000R2-0J; Thu, 25 Oct 2018 07:12:54 -0400 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id ABD28929F24AA5F32B51; Thu, 25 Oct 2018 19:12:30 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id w9PBCJLo015337; Thu, 25 Oct 2018 19:12:19 +0800 (GMT-8) (envelope-from peng.hao2@zte.com.cn) Received: from localhost.localdomain.localdomain ([10.74.120.59]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018102519125091-6703129 ; Thu, 25 Oct 2018 19:12:50 +0800 From: Peng Hao To: peter.maydell@linaro.org, philmd@redhat.com Date: Fri, 26 Oct 2018 03:23:14 +0800 Message-Id: <1540495397-88089-3-git-send-email-peng.hao2@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1540495397-88089-1-git-send-email-peng.hao2@zte.com.cn> References: <1540495397-88089-1-git-send-email-peng.hao2@zte.com.cn> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-10-25 19:12:51, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-10-25 19:12:07 Content-Transfer-Encoding: quoted-printable X-MAIL: mse01.zte.com.cn w9PBCJLo015337 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 63.217.80.70 Subject: [Qemu-devel] [PATCH V4 2/5] hw/misc/pvpanic: Cosmetic renaming 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-arm@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 To ease the MMIO device addition in the next patch, rename: - ISA_PVPANIC_DEVICE -> PVPANIC (this just returns a generic Object), - ISADevice parent_obj -> isadev, - MemoryRegion io -> mr. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/misc/pvpanic.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index 9d8961b..dd3aef2 100644 --- a/hw/misc/pvpanic.c +++ b/hw/misc/pvpanic.c @@ -25,7 +25,7 @@ /* The pv event value */ #define PVPANIC_PANICKED (1 << PVPANIC_F_PANICKED) =20 -#define ISA_PVPANIC_DEVICE(obj) \ +#define PVPANIC(obj) \ OBJECT_CHECK(PVPanicState, (obj), TYPE_PVPANIC) =20 static void handle_event(int event) @@ -46,9 +46,11 @@ static void handle_event(int event) #include "hw/isa/isa.h" =20 typedef struct PVPanicState { - ISADevice parent_obj; + /* private */ + ISADevice isadev; =20 - MemoryRegion io; + /* public */ + MemoryRegion mr; uint16_t ioport; } PVPanicState; =20 @@ -75,15 +77,15 @@ static const MemoryRegionOps pvpanic_ops =3D { =20 static void pvpanic_isa_initfn(Object *obj) { - PVPanicState *s =3D ISA_PVPANIC_DEVICE(obj); + PVPanicState *s =3D PVPANIC(obj); =20 - memory_region_init_io(&s->io, OBJECT(s), &pvpanic_ops, s, "pvpanic", 1= ); + memory_region_init_io(&s->mr, OBJECT(s), &pvpanic_ops, s, "pvpanic", 1= ); } =20 static void pvpanic_isa_realizefn(DeviceState *dev, Error **errp) { ISADevice *d =3D ISA_DEVICE(dev); - PVPanicState *s =3D ISA_PVPANIC_DEVICE(dev); + PVPanicState *s =3D PVPANIC(dev); FWCfgState *fw_cfg =3D fw_cfg_find(); uint16_t *pvpanic_port; =20 @@ -96,7 +98,7 @@ static void pvpanic_isa_realizefn(DeviceState *dev, Error= **errp) fw_cfg_add_file(fw_cfg, "etc/pvpanic-port", pvpanic_port, sizeof(*pvpanic_port)); =20 - isa_register_ioport(d, &s->io, s->ioport); + isa_register_ioport(d, &s->mr, s->ioport); } =20 static Property pvpanic_isa_properties[] =3D { --=20 1.8.3.1