qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-arm@nongnu.org, "Daniel P. Berrange" <berrange@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: [PATCH v2 04/58] pl110: Rename pl110_version enum values
Date: Wed, 19 Aug 2020 20:11:42 -0400	[thread overview]
Message-ID: <20200820001236.1284548-5-ehabkost@redhat.com> (raw)
In-Reply-To: <20200820001236.1284548-1-ehabkost@redhat.com>

The PL110 enum value name will conflict with the PL110 type cast
checker, when we replace the existing macro with an inline
function.  Add a VERSION_ prefix to all pl110_version enum
values, to avoid conflicts.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2:
* Fixed typo on commit message
* Rename all enum values to VERSION_* (Philippe Mathieu-Daudé)

---
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org
---
 hw/display/pl110.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/hw/display/pl110.c b/hw/display/pl110.c
index c2991a28d2..61fefbffb3 100644
--- a/hw/display/pl110.c
+++ b/hw/display/pl110.c
@@ -42,9 +42,9 @@ enum pl110_bppmode
 /* The Versatile/PB uses a slightly modified PL110 controller.  */
 enum pl110_version
 {
-    PL110,
-    PL110_VERSATILE,
-    PL111
+    VERSION_PL110,
+    VERSION_PL110_VERSATILE,
+    VERSION_PL111
 };
 
 #define TYPE_PL110 "pl110"
@@ -189,7 +189,7 @@ static void pl110_update_display(void *opaque)
     else
         bpp_offset = 24;
 
-    if ((s->version != PL111) && (s->bpp == BPP_16)) {
+    if ((s->version != VERSION_PL111) && (s->bpp == BPP_16)) {
         /* The PL110's native 16 bit mode is 5551; however
          * most boards with a PL110 implement an external
          * mux which allows bits to be reshuffled to give
@@ -372,12 +372,12 @@ static uint64_t pl110_read(void *opaque, hwaddr offset,
     case 5: /* LCDLPBASE */
         return s->lpbase;
     case 6: /* LCDIMSC */
-        if (s->version != PL110) {
+        if (s->version != VERSION_PL110) {
             return s->cr;
         }
         return s->int_mask;
     case 7: /* LCDControl */
-        if (s->version != PL110) {
+        if (s->version != VERSION_PL110) {
             return s->int_mask;
         }
         return s->cr;
@@ -437,7 +437,7 @@ static void pl110_write(void *opaque, hwaddr offset,
         s->lpbase = val;
         break;
     case 6: /* LCDIMSC */
-        if (s->version != PL110) {
+        if (s->version != VERSION_PL110) {
             goto control;
         }
     imsc:
@@ -445,7 +445,7 @@ static void pl110_write(void *opaque, hwaddr offset,
         pl110_update(s);
         break;
     case 7: /* LCDControl */
-        if (s->version != PL110) {
+        if (s->version != VERSION_PL110) {
             goto imsc;
         }
     control:
@@ -513,21 +513,21 @@ static void pl110_init(Object *obj)
 {
     PL110State *s = PL110(obj);
 
-    s->version = PL110;
+    s->version = VERSION_PL110;
 }
 
 static void pl110_versatile_init(Object *obj)
 {
     PL110State *s = PL110(obj);
 
-    s->version = PL110_VERSATILE;
+    s->version = VERSION_PL110_VERSATILE;
 }
 
 static void pl111_init(Object *obj)
 {
     PL110State *s = PL110(obj);
 
-    s->version = PL111;
+    s->version = VERSION_PL111;
 }
 
 static void pl110_class_init(ObjectClass *klass, void *data)
-- 
2.26.2



  parent reply	other threads:[~2020-08-20  0:15 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  0:11 [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 01/58] e1000: Rename QOM class cast macros Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 02/58] megasas: " Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 03/58] vmw_pvscsi: " Eduardo Habkost
2020-08-20  0:11 ` Eduardo Habkost [this message]
2020-08-20 13:11   ` [PATCH v2 04/58] pl110: Rename pl110_version enum values Philippe Mathieu-Daudé
2020-08-25 11:05   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 05/58] allwinner-h3: Rename memmap enum constants Eduardo Habkost
2020-08-21 19:42   ` Niek Linnenbank
2020-08-25 11:07   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 06/58] aspeed_soc: Rename memmap/irqmap " Eduardo Habkost
2020-08-20  6:41   ` Cédric Le Goater
2020-08-25 11:08   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 07/58] opentitan: Rename memmap " Eduardo Habkost
2020-08-25 11:09   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 08/58] sifive_e: " Eduardo Habkost
2020-08-25 11:10   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 09/58] sifive_u: " Eduardo Habkost
2020-08-25 11:10   ` Daniel P. Berrangé
2020-08-20  0:11 ` [PATCH v2 10/58] aspeed_timer: Fix ASPEED_TIMER macro definition Eduardo Habkost
2020-08-20  6:42   ` Cédric Le Goater
2020-08-20  0:11 ` [PATCH v2 11/58] versatile: Fix typo in PCI_VPB_HOST definition Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 12/58] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS Eduardo Habkost
2020-08-21 18:19   ` David Hildenbrand
2020-08-20  0:11 ` [PATCH v2 13/58] hvf: Add missing include Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 14/58] hcd-dwc2: Rename USB_*CLASS macros for consistency Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 15/58] tulip: Move TulipState typedef to header Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 16/58] throttle-groups: Move ThrottleGroup " Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 17/58] pci: Move PCIBusClass typedef to pci.h Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 18/58] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h Eduardo Habkost
2020-08-21 11:17   ` Roman Bolshakov
2020-08-21 11:23   ` Roman Bolshakov
2020-08-25 11:35     ` Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 20/58] mcf_fec: Move mcf_fec_state typedef to header Eduardo Habkost
2020-08-27  8:09   ` Thomas Huth
2020-08-20  0:11 ` [PATCH v2 21/58] s390_flic: Move KVMS390FLICState " Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 22/58] can_emu: Delete macros for non-existing typedef Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 23/58] nubus: Delete unused NUBUS_BRIDGE macro Eduardo Habkost
2020-08-20 15:05   ` Laurent Vivier
2020-08-20  0:12 ` [PATCH v2 24/58] platform-bus: Delete macros for non-existing typedef Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 25/58] armsse: Rename QOM macros to avoid conflicts Eduardo Habkost
2020-08-25 11:12   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 26/58] xen-legacy-backend: Add missing typedef XenLegacyDevice Eduardo Habkost
2020-08-20 15:34   ` Anthony PERARD via
2020-08-25 11:12   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 27/58] spapr: Move typedef SpaprMachineState to spapr.h Eduardo Habkost
2020-08-25 11:13   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 28/58] s390x: Move typedef SCLPEventFacility to event-facility.h Eduardo Habkost
2020-08-20  7:03   ` Cornelia Huck
2020-08-25 11:13   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 29/58] vhost-user-gpu: Move QOM macro to header Eduardo Habkost
2020-08-20  5:39   ` Gerd Hoffmann
2020-08-25 11:15   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 30/58] ahci: Move QOM macros " Eduardo Habkost
2020-08-25 11:15   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 31/58] i8257: Move QOM macro " Eduardo Habkost
2020-08-25 11:16   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 32/58] ahci: " Eduardo Habkost
2020-08-25 11:16   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 33/58] pckbd: " Eduardo Habkost
2020-08-25 11:16   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 34/58] vmbus: Move QOM macros to vmbus.h Eduardo Habkost
2020-08-25 11:17   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 35/58] virtio-serial-bus: Move QOM macros to header Eduardo Habkost
2020-08-25 11:17   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 36/58] piix: " Eduardo Habkost
2020-08-20 13:13   ` Philippe Mathieu-Daudé
2020-08-25 11:18   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 37/58] auxbus: " Eduardo Habkost
2020-08-25 11:18   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 38/58] rocker: " Eduardo Habkost
2020-08-25 11:19   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 39/58] pxa2xx: " Eduardo Habkost
2020-08-25 11:19   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 40/58] mptsas: " Eduardo Habkost
2020-08-25 11:20   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 41/58] kvm: Move QOM macros to kvm.h Eduardo Habkost
2020-08-25 11:20   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 42/58] vfio/pci: Move QOM macros to header Eduardo Habkost
2020-08-20 13:14   ` Philippe Mathieu-Daudé
2020-08-20 13:14   ` Philippe Mathieu-Daudé
2020-08-25 11:20   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 43/58] qom: make object_ref/unref use a void * instead of Object * Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 44/58] qom: provide convenient macros for declaring and defining types Eduardo Habkost
2020-08-20 17:45   ` Eduardo Habkost
2020-08-20 17:57     ` Daniel P. Berrangé
2020-08-20 18:48       ` Eduardo Habkost
2020-08-20 18:40     ` Laurent Vivier
2020-08-20  0:12 ` [PATCH v2 45/58] qom: Allow class type name to be specified in OBJECT_DECLARE* Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 46/58] qom: DECLARE_*_CHECKERS macros Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 47/58] qom: Make type checker functions accept const pointers Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 48/58] qom: TYPE_INFO macro Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 49/58] codeconverter: script for automating QOM code cleanups Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 50/58] [automated] Delete duplicate QOM typedefs Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 51/58] [automated] Use TYPE_INFO macro Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 52/58] [automated] Move QOM typedefs and add missing includes Eduardo Habkost
2020-08-25 11:26   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 53/58] [automated] Use DECLARE_*CHECKER* macros Eduardo Habkost
2020-08-25 11:35   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 54/58] [semi-automated] Use DECLARE_*CHECKER* when possible (--force mode) Eduardo Habkost
2020-08-25 11:43   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 55/58] [automated] Use OBJECT_DECLARE_TYPE where possible Eduardo Habkost
2020-08-25 11:47   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 56/58] [automated] Use OBJECT_DECLARE_SIMPLE_TYPE when possible Eduardo Habkost
2020-08-25 11:49   ` Daniel P. Berrangé
2020-08-20  0:12 ` [PATCH v2 57/58] crypto: use QOM macros for declaration/definition of secret types Eduardo Habkost
2020-08-20  0:12 ` [PATCH v2 58/58] crypto: use QOM macros for declaration/definition of TLS creds types Eduardo Habkost
2020-08-20  0:18 ` [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate Eduardo Habkost
2020-08-20  0:55 ` no-reply
2020-08-20  1:00 ` no-reply
2020-08-20  1:09 ` 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=20200820001236.1284548-5-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@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 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).