All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, lersek@redhat.com, kwolf@redhat.com,
	mreitz@redhat.com, qemu-block@nongnu.org, qemu-ppc@nongnu.org,
	philmd@redhat.com, balaton@eik.bme.hu
Subject: [Qemu-devel] [PATCH v3 04/14] pflash: Rename *CFI_PFLASH* to *PFLASH_CFI*
Date: Thu,  7 Mar 2019 14:03:13 +0100	[thread overview]
Message-ID: <20190307130323.9353-5-armbru@redhat.com> (raw)
In-Reply-To: <20190307130323.9353-1-armbru@redhat.com>

pflash_cfi01.c and pflash_cfi02.c start their identifiers with
pflash_cfi01_ and pflash_cfi02_ respectively, except for
CFI_PFLASH01(), TYPE_CFI_PFLASH01, CFI_PFLASH02(), TYPE_CFI_PFLASH02.
Rename for consistency.

Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
---
 hw/block/pflash_cfi01.c  | 12 ++++++------
 hw/block/pflash_cfi02.c  | 12 ++++++------
 include/hw/block/flash.h |  4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index d381f14e3c..f75f0a6998 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -59,8 +59,8 @@ do {                                                        \
 #define DPRINTF(fmt, ...) do { } while (0)
 #endif
 
-#define CFI_PFLASH01(obj) \
-    OBJECT_CHECK(PFlashCFI01, (obj), TYPE_CFI_PFLASH01)
+#define PFLASH_CFI01(obj) \
+    OBJECT_CHECK(PFlashCFI01, (obj), TYPE_PFLASH_CFI01)
 
 #define PFLASH_BE          0
 #define PFLASH_SECURE      1
@@ -698,7 +698,7 @@ static const MemoryRegionOps pflash_cfi01_ops = {
 
 static void pflash_cfi01_realize(DeviceState *dev, Error **errp)
 {
-    PFlashCFI01 *pfl = CFI_PFLASH01(dev);
+    PFlashCFI01 *pfl = PFLASH_CFI01(dev);
     uint64_t total_len;
     int ret;
     uint64_t blocks_per_device, sector_len_per_device, device_len;
@@ -926,7 +926,7 @@ static void pflash_cfi01_class_init(ObjectClass *klass, void *data)
 
 
 static const TypeInfo pflash_cfi01_info = {
-    .name           = TYPE_CFI_PFLASH01,
+    .name           = TYPE_PFLASH_CFI01,
     .parent         = TYPE_SYS_BUS_DEVICE,
     .instance_size  = sizeof(PFlashCFI01),
     .class_init     = pflash_cfi01_class_init,
@@ -949,7 +949,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base,
                                    uint16_t id2, uint16_t id3,
                                    int be)
 {
-    DeviceState *dev = qdev_create(NULL, TYPE_CFI_PFLASH01);
+    DeviceState *dev = qdev_create(NULL, TYPE_PFLASH_CFI01);
 
     if (blk) {
         qdev_prop_set_drive(dev, "drive", blk, &error_abort);
@@ -966,7 +966,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base,
     qdev_init_nofail(dev);
 
     sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
-    return CFI_PFLASH01(dev);
+    return PFLASH_CFI01(dev);
 }
 
 MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl)
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 9f8486e4cf..c0869fc417 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -57,8 +57,8 @@ do {                                                       \
 
 #define PFLASH_LAZY_ROMD_THRESHOLD 42
 
-#define CFI_PFLASH02(obj) \
-    OBJECT_CHECK(PFlashCFI02, (obj), TYPE_CFI_PFLASH02)
+#define PFLASH_CFI02(obj) \
+    OBJECT_CHECK(PFlashCFI02, (obj), TYPE_PFLASH_CFI02)
 
 struct PFlashCFI02 {
     /*< private >*/
@@ -534,7 +534,7 @@ static const MemoryRegionOps pflash_cfi02_ops_le = {
 
 static void pflash_cfi02_realize(DeviceState *dev, Error **errp)
 {
-    PFlashCFI02 *pfl = CFI_PFLASH02(dev);
+    PFlashCFI02 *pfl = PFLASH_CFI02(dev);
     uint32_t chip_len;
     int ret;
     Error *local_err = NULL;
@@ -706,7 +706,7 @@ static void pflash_cfi02_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo pflash_cfi02_info = {
-    .name           = TYPE_CFI_PFLASH02,
+    .name           = TYPE_PFLASH_CFI02,
     .parent         = TYPE_SYS_BUS_DEVICE,
     .instance_size  = sizeof(PFlashCFI02),
     .class_init     = pflash_cfi02_class_init,
@@ -731,7 +731,7 @@ PFlashCFI02 *pflash_cfi02_register(hwaddr base,
                                    uint16_t unlock_addr1,
                                    int be)
 {
-    DeviceState *dev = qdev_create(NULL, TYPE_CFI_PFLASH02);
+    DeviceState *dev = qdev_create(NULL, TYPE_PFLASH_CFI02);
 
     if (blk) {
         qdev_prop_set_drive(dev, "drive", blk, &error_abort);
@@ -751,5 +751,5 @@ PFlashCFI02 *pflash_cfi02_register(hwaddr base,
     qdev_init_nofail(dev);
 
     sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
-    return CFI_PFLASH02(dev);
+    return PFLASH_CFI02(dev);
 }
diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h
index 51d8f60c65..333005d9ff 100644
--- a/include/hw/block/flash.h
+++ b/include/hw/block/flash.h
@@ -7,7 +7,7 @@
 
 /* pflash_cfi01.c */
 
-#define TYPE_CFI_PFLASH01 "cfi.pflash01"
+#define TYPE_PFLASH_CFI01 "cfi.pflash01"
 
 typedef struct PFlashCFI01 PFlashCFI01;
 
@@ -24,7 +24,7 @@ MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl);
 
 /* pflash_cfi02.c */
 
-#define TYPE_CFI_PFLASH02 "cfi.pflash02"
+#define TYPE_PFLASH_CFI02 "cfi.pflash02"
 
 typedef struct PFlashCFI02 PFlashCFI02;
 
-- 
2.17.2

  parent reply	other threads:[~2019-03-07 13:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 13:03 [Qemu-devel] [PATCH v3 00/14] pflash: Fixes and cleanups Markus Armbruster
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 01/14] pflash: Rename pflash_t to PFlashCFI01, PFlashCFI02 Markus Armbruster
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 02/14] pflash_cfi01: Do not exit() on guest aborting "write to buffer" Markus Armbruster
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 03/14] pflash_cfi01: Log use of flawed " Markus Armbruster
2019-03-07 13:03 ` Markus Armbruster [this message]
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 05/14] hw: Use PFLASH_CFI0{1, 2} and TYPE_PFLASH_CFI0{1, 2} Markus Armbruster
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 06/14] sam460ex: Don't size flash memory to match backing image Markus Armbruster
2019-03-08 14:04   ` Philippe Mathieu-Daudé
2019-03-08 14:27     ` Markus Armbruster
2019-03-08 14:34       ` Philippe Mathieu-Daudé
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 07/14] ppc405_boards: " Markus Armbruster
2019-03-08  0:10   ` David Gibson
2019-03-08  7:24     ` Markus Armbruster
2019-03-08 11:09       ` David Gibson
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 08/14] r2d: Fix flash memory size, sector size, width, device ID Markus Armbruster
2019-03-07 13:51   ` Philippe Mathieu-Daudé
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 09/14] hw/mips/malta: Fix the DEBUG_BOARD_INIT code Markus Armbruster
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 10/14] hw/mips/malta: Remove fl_sectors variable Markus Armbruster
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 11/14] hw/mips/malta: Restrict 'bios_size' variable scope Markus Armbruster
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 12/14] mips_malta: Clean up definition of flash memory size somewhat Markus Armbruster
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 13/14] pflash: Clean up after commit 368a354f02b, part 1 Markus Armbruster
2019-03-07 13:03 ` [Qemu-devel] [PATCH v3 14/14] pflash: Clean up after commit 368a354f02b, part 2 Markus Armbruster
2019-03-08 14:05   ` Philippe Mathieu-Daudé
2019-03-09 13:27 ` [Qemu-devel] [PATCH v3 00/14] pflash: Fixes and cleanups no-reply

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=20190307130323.9353-5-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=kwolf@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.