qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Fam Zheng <fam@euphon.net>, Paolo Bonzini <pbonzini@redhat.com>,
	Hannes Reinecke <hare@suse.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	qemu-block@nongnu.org
Subject: [PATCH v2 02/58] megasas: Rename QOM class cast macros
Date: Wed, 19 Aug 2020 20:11:40 -0400	[thread overview]
Message-ID: <20200820001236.1284548-3-ehabkost@redhat.com> (raw)
In-Reply-To: <20200820001236.1284548-1-ehabkost@redhat.com>

Rename the MEGASAS_DEVICE_CLASS() and MEGASAS_DEVICE_GET_CLASS()
macros to be consistent with the MEGASAS() instance cast macro.

This will allow us to register the type cast macros using
OBJECT_DECLARE_TYPE later.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2: none

---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Fam Zheng <fam@euphon.net>
Cc: Hannes Reinecke <hare@suse.com>
Cc: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org
---
 hw/scsi/megasas.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 5cfd1bf22e..390c2f2edb 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -134,9 +134,9 @@ typedef struct MegasasBaseClass {
 #define MEGASAS(obj) \
     OBJECT_CHECK(MegasasState, (obj), TYPE_MEGASAS_BASE)
 
-#define MEGASAS_DEVICE_CLASS(oc) \
+#define MEGASAS_CLASS(oc) \
     OBJECT_CLASS_CHECK(MegasasBaseClass, (oc), TYPE_MEGASAS_BASE)
-#define MEGASAS_DEVICE_GET_CLASS(oc) \
+#define MEGASAS_GET_CLASS(oc) \
     OBJECT_GET_CLASS(MegasasBaseClass, (oc), TYPE_MEGASAS_BASE)
 
 #define MEGASAS_INTR_DISABLED_MASK 0xFFFFFFFF
@@ -733,7 +733,7 @@ static int megasas_ctrl_get_info(MegasasState *s, MegasasCmd *cmd)
 {
     PCIDevice *pci_dev = PCI_DEVICE(s);
     PCIDeviceClass *pci_class = PCI_DEVICE_GET_CLASS(pci_dev);
-    MegasasBaseClass *base_class = MEGASAS_DEVICE_GET_CLASS(s);
+    MegasasBaseClass *base_class = MEGASAS_GET_CLASS(s);
     struct mfi_ctrl_info info;
     size_t dcmd_size = sizeof(info);
     BusChild *kid;
@@ -1999,7 +1999,7 @@ static uint64_t megasas_mmio_read(void *opaque, hwaddr addr,
 {
     MegasasState *s = opaque;
     PCIDevice *pci_dev = PCI_DEVICE(s);
-    MegasasBaseClass *base_class = MEGASAS_DEVICE_GET_CLASS(s);
+    MegasasBaseClass *base_class = MEGASAS_GET_CLASS(s);
     uint32_t retval = 0;
 
     switch (addr) {
@@ -2322,7 +2322,7 @@ static const struct SCSIBusInfo megasas_scsi_info = {
 static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
 {
     MegasasState *s = MEGASAS(dev);
-    MegasasBaseClass *b = MEGASAS_DEVICE_GET_CLASS(s);
+    MegasasBaseClass *b = MEGASAS_GET_CLASS(s);
     uint8_t *pci_conf;
     int i, bar_type;
     Error *err = NULL;
@@ -2506,7 +2506,7 @@ static void megasas_class_init(ObjectClass *oc, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(oc);
     PCIDeviceClass *pc = PCI_DEVICE_CLASS(oc);
-    MegasasBaseClass *e = MEGASAS_DEVICE_CLASS(oc);
+    MegasasBaseClass *e = MEGASAS_CLASS(oc);
     const MegasasInfo *info = data;
 
     pc->realize = megasas_scsi_realize;
-- 
2.26.2



  parent reply	other threads:[~2020-08-20  0:13 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 ` Eduardo Habkost [this message]
2020-08-20  0:11 ` [PATCH v2 03/58] vmw_pvscsi: " Eduardo Habkost
2020-08-20  0:11 ` [PATCH v2 04/58] pl110: Rename pl110_version enum values Eduardo Habkost
2020-08-20 13:11   ` 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-3-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=berrange@redhat.com \
    --cc=fam@euphon.net \
    --cc=hare@suse.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@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).