qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peng Hao <peng.hao2@zte.com.cn>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Wen Congyang" <wency@cn.fujitsu.com>,
	"Hu Tao" <hutao@cn.fujitsu.com>
Subject: [Qemu-devel] [PATCH v3 2/4] hw/misc/pvpanic: Cosmetic renaming
Date: Thu, 18 Oct 2018 15:04:32 +0200	[thread overview]
Message-ID: <20181018130434.23237-3-philmd@redhat.com> (raw)
In-Reply-To: <20181018130434.23237-1-philmd@redhat.com>

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é <philmd@redhat.com>
---
 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 9d8961ba0c..4f552e1533 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)
 
-#define ISA_PVPANIC_DEVICE(obj)    \
+#define PVPANIC(obj)    \
     OBJECT_CHECK(PVPanicState, (obj), TYPE_PVPANIC)
 
 static void handle_event(int event)
@@ -46,9 +46,11 @@ static void handle_event(int event)
 #include "hw/isa/isa.h"
 
 typedef struct PVPanicState {
-    ISADevice parent_obj;
+    /*< private >*/
+    ISADevice isadev;
 
-    MemoryRegion io;
+    /*< public >*/
+    MemoryRegion mr;
     uint16_t ioport;
 } PVPanicState;
 
@@ -75,15 +77,15 @@ static const MemoryRegionOps pvpanic_ops = {
 
 static void pvpanic_isa_initfn(Object *obj)
 {
-    PVPanicState *s = ISA_PVPANIC_DEVICE(obj);
+    PVPanicState *s = PVPANIC(obj);
 
-    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);
 }
 
 static void pvpanic_isa_realizefn(DeviceState *dev, Error **errp)
 {
     ISADevice *d = ISA_DEVICE(dev);
-    PVPanicState *s = ISA_PVPANIC_DEVICE(dev);
+    PVPanicState *s = PVPANIC(dev);
     FWCfgState *fw_cfg = fw_cfg_find();
     uint16_t *pvpanic_port;
 
@@ -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));
 
-    isa_register_ioport(d, &s->io, s->ioport);
+    isa_register_ioport(d, &s->mr, s->ioport);
 }
 
 static Property pvpanic_isa_properties[] = {
-- 
2.17.2

  parent reply	other threads:[~2018-10-18 13:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 13:04 [Qemu-devel] [PATCH v3 0/4] hw/misc: Add a MMIO interface to the pvpanic device Philippe Mathieu-Daudé
2018-10-18 13:04 ` [Qemu-devel] [PATCH v3 1/4] hw/misc/pvpanic: Build the pvpanic device in $(common-obj) Philippe Mathieu-Daudé
2018-10-18 13:04 ` Philippe Mathieu-Daudé [this message]
2018-10-18 13:04 ` [Qemu-devel] [PATCH v3 3/4] hw/misc/pvpanic: Add the MMIO interface Philippe Mathieu-Daudé
2018-10-18 13:08   ` Peter Maydell
2018-10-18 13:19     ` Philippe Mathieu-Daudé
2018-10-18 13:27       ` Peter Maydell
2018-10-18 16:13   ` peng.hao2
2018-10-18 13:04 ` [Qemu-devel] [PATCH v3 4/4] hw/arm/virt: Use the pvpanic device Philippe Mathieu-Daudé
2018-10-18 13:37   ` Peter Maydell
2018-10-18 16:07     ` peng.hao2
2018-10-18 13:09 ` [Qemu-devel] [PATCH v3 0/4] hw/misc: Add a MMIO interface to " Philippe Mathieu-Daudé
2018-10-25  5:47   ` [Qemu-devel] [PATCH v3 0/4] hw/misc: Add a MMIO interface to the pvpanicdevice peng.hao2

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181018130434.23237-3-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=peng.hao2@zte.com.cn \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wency@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).