qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Roman Bolshakov" <r.bolshakov@yadro.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>
Subject: [PULL 03/53] megasas: Rename QOM class cast macros
Date: Thu, 27 Aug 2020 15:20:32 -0400	[thread overview]
Message-ID: <20200827192122.658035-4-ehabkost@redhat.com> (raw)
In-Reply-To: <20200827192122.658035-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>
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200825192110.3528606-3-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 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-27 19:35 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 19:20 [PULL 00/53] Machine queue + QOM fixes and cleanups Eduardo Habkost
2020-08-27 19:20 ` [PULL 01/53] numa: hmat: fix cache size check Eduardo Habkost
2020-08-27 19:20 ` [PULL 02/53] e1000: Rename QOM class cast macros Eduardo Habkost
2020-08-27 19:20 ` Eduardo Habkost [this message]
2020-08-27 19:20 ` [PULL 04/53] vmw_pvscsi: " Eduardo Habkost
2020-08-27 19:20 ` [PULL 05/53] pl110: Rename pl110_version enum values Eduardo Habkost
2020-08-27 19:20 ` [PULL 06/53] allwinner-h3: Rename memmap enum constants Eduardo Habkost
2020-08-27 19:20 ` [PULL 07/53] aspeed_soc: Rename memmap/irqmap " Eduardo Habkost
2020-08-27 19:20 ` [PULL 08/53] opentitan: Rename memmap " Eduardo Habkost
2020-08-27 19:20 ` [PULL 09/53] aspeed_timer: Fix ASPEED_TIMER macro definition Eduardo Habkost
2020-08-27 19:20 ` [PULL 10/53] versatile: Fix typo in PCI_VPB_HOST definition Eduardo Habkost
2020-08-27 19:20 ` [PULL 11/53] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS Eduardo Habkost
2020-08-27 19:20 ` [PULL 12/53] hvf: Add missing include Eduardo Habkost
2020-08-27 19:20 ` [PULL 13/53] hcd-dwc2: Rename USB_*CLASS macros for consistency Eduardo Habkost
2020-08-27 19:20 ` [PULL 14/53] tulip: Move TulipState typedef to header Eduardo Habkost
2020-08-27 19:20 ` [PULL 15/53] throttle-groups: Move ThrottleGroup " Eduardo Habkost
2020-08-27 19:20 ` [PULL 16/53] pci: Move PCIBusClass typedef to pci.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 17/53] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 18/53] hvf: Move HVFState typedef to hvf.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 19/53] mcf_fec: Move mcf_fec_state typedef to header Eduardo Habkost
2020-08-27 19:20 ` [PULL 20/53] s390_flic: Move KVMS390FLICState " Eduardo Habkost
2020-08-27 19:20 ` [PULL 21/53] can_emu: Delete macros for non-existing typedef Eduardo Habkost
2020-08-27 19:20 ` [PULL 22/53] nubus: Delete unused NUBUS_BRIDGE macro Eduardo Habkost
2020-08-27 19:20 ` [PULL 23/53] platform-bus: Delete macros for non-existing typedef Eduardo Habkost
2020-08-27 19:20 ` [PULL 24/53] armsse: Rename QOM macros to avoid conflicts Eduardo Habkost
2020-08-27 19:20 ` [PULL 25/53] xen-legacy-backend: Add missing typedef XenLegacyDevice Eduardo Habkost
2020-08-27 19:20 ` [PULL 26/53] spapr: Move typedef SpaprMachineState to spapr.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 27/53] s390x: Move typedef SCLPEventFacility to event-facility.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 28/53] vhost-user-gpu: Move QOM macro to header Eduardo Habkost
2020-08-27 19:20 ` [PULL 29/53] ahci: Move QOM macros " Eduardo Habkost
2020-08-27 19:20 ` [PULL 30/53] i8257: Move QOM macro " Eduardo Habkost
2020-08-27 19:21 ` [PULL 31/53] ahci: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 32/53] pckbd: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 33/53] vmbus: Move QOM macros to vmbus.h Eduardo Habkost
2020-08-27 19:21 ` [PULL 34/53] virtio-serial-bus: Move QOM macros to header Eduardo Habkost
2020-08-27 19:21 ` [PULL 35/53] piix: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 36/53] auxbus: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 37/53] rocker: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 38/53] pxa2xx: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 39/53] mptsas: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 40/53] kvm: Move QOM macros to kvm.h Eduardo Habkost
2020-08-27 19:21 ` [PULL 41/53] vfio/pci: Move QOM macros to header Eduardo Habkost
2020-08-27 19:21 ` [PULL 42/53] nubus: Rename class type checking macros Eduardo Habkost
2020-08-27 19:21 ` [PULL 43/53] s390-virtio-ccw: Rename S390_MACHINE_CLASS macro Eduardo Habkost
2020-08-27 19:21 ` [PULL 44/53] swim: Rename struct SWIM to Swim Eduardo Habkost
2020-08-27 19:21 ` [PULL 45/53] migration: Rename class type checking macros Eduardo Habkost
2020-08-27 19:21 ` [PULL 46/53] etsec: Use TYPE_ETSEC_COMMON constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 47/53] nios2_iic: Use TYPE_ALTERA_IIC constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 48/53] amd_iommu: Use TYPE_AMD_IOMMU_PCI constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 49/53] sclpconsole: Use TYPE_* constants Eduardo Habkost
2020-08-27 19:21 ` [PULL 50/53] xlnx-zcu102: Use TYPE_ZCU102_MACHINE constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 51/53] tosa: Use TYPE_TOSA_MISC_GPIO constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 52/53] ppce500: Use TYPE_PPC_E500_PCI_BRIDGE constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 53/53] dc390: Use TYPE_DC390_DEVICE constant Eduardo Habkost
2020-08-28 11:32 ` [PULL 00/53] Machine queue + QOM fixes and cleanups Peter Maydell

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=20200827192122.658035-4-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=berrange@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.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).