[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/58] vmw_pvscsi: Rename QOM class cast macros
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 03/58] vmw_pvscsi: Rename QOM class cast macros |
Date: |
Wed, 19 Aug 2020 20:11:41 -0400 |
Rename the PVSCSI_DEVICE_CLASS() and PVSCSI_DEVICE_GET_CLASS()
macros to be consistent with the PVSCSI() 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: Dmitry Fleytman <dmitry.fleytman@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Fam Zheng <fam@euphon.net>
Cc: qemu-devel@nongnu.org
---
hw/scsi/vmw_pvscsi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index df07ab6bfb..c071e0c7aa 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -64,9 +64,9 @@ typedef struct PVSCSIClass {
#define TYPE_PVSCSI "pvscsi"
#define PVSCSI(obj) OBJECT_CHECK(PVSCSIState, (obj), TYPE_PVSCSI)
-#define PVSCSI_DEVICE_CLASS(klass) \
+#define PVSCSI_CLASS(klass) \
OBJECT_CLASS_CHECK(PVSCSIClass, (klass), TYPE_PVSCSI)
-#define PVSCSI_DEVICE_GET_CLASS(obj) \
+#define PVSCSI_GET_CLASS(obj) \
OBJECT_GET_CLASS(PVSCSIClass, (obj), TYPE_PVSCSI)
/* Compatibility flags for migration */
@@ -1265,7 +1265,7 @@ static Property pvscsi_properties[] = {
static void pvscsi_realize(DeviceState *qdev, Error **errp)
{
- PVSCSIClass *pvs_c = PVSCSI_DEVICE_GET_CLASS(qdev);
+ PVSCSIClass *pvs_c = PVSCSI_GET_CLASS(qdev);
PCIDevice *pci_dev = PCI_DEVICE(qdev);
PVSCSIState *s = PVSCSI(qdev);
@@ -1280,7 +1280,7 @@ static void pvscsi_class_init(ObjectClass *klass, void
*data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
- PVSCSIClass *pvs_k = PVSCSI_DEVICE_CLASS(klass);
+ PVSCSIClass *pvs_k = PVSCSI_CLASS(klass);
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass);
k->realize = pvscsi_realizefn;
--
2.26.2
- [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate, Eduardo Habkost, 2020/08/19
- [PATCH v2 01/58] e1000: Rename QOM class cast macros, Eduardo Habkost, 2020/08/19
- [PATCH v2 04/58] pl110: Rename pl110_version enum values, Eduardo Habkost, 2020/08/19
- [PATCH v2 02/58] megasas: Rename QOM class cast macros, Eduardo Habkost, 2020/08/19
- [PATCH v2 03/58] vmw_pvscsi: Rename QOM class cast macros,
Eduardo Habkost <=
- [PATCH v2 05/58] allwinner-h3: Rename memmap enum constants, Eduardo Habkost, 2020/08/19
- [PATCH v2 06/58] aspeed_soc: Rename memmap/irqmap enum constants, Eduardo Habkost, 2020/08/19
- [PATCH v2 08/58] sifive_e: Rename memmap enum constants, Eduardo Habkost, 2020/08/19
- [PATCH v2 07/58] opentitan: Rename memmap enum constants, Eduardo Habkost, 2020/08/19