Skip to content

Commit bd7dff9

Browse files
committed
vmw_pvscsi: Rename QOM class cast macros
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é <[email protected]> Signed-off-by: Eduardo Habkost <[email protected]> Tested-By: Roman Bolshakov <[email protected]> Message-Id: <[email protected]> Signed-off-by: Eduardo Habkost <[email protected]>
1 parent 2e0aec1 commit bd7dff9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hw/scsi/vmw_pvscsi.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ typedef struct PVSCSIClass {
6464
#define TYPE_PVSCSI "pvscsi"
6565
#define PVSCSI(obj) OBJECT_CHECK(PVSCSIState, (obj), TYPE_PVSCSI)
6666

67-
#define PVSCSI_DEVICE_CLASS(klass) \
67+
#define PVSCSI_CLASS(klass) \
6868
OBJECT_CLASS_CHECK(PVSCSIClass, (klass), TYPE_PVSCSI)
69-
#define PVSCSI_DEVICE_GET_CLASS(obj) \
69+
#define PVSCSI_GET_CLASS(obj) \
7070
OBJECT_GET_CLASS(PVSCSIClass, (obj), TYPE_PVSCSI)
7171

7272
/* Compatibility flags for migration */
@@ -1265,7 +1265,7 @@ static Property pvscsi_properties[] = {
12651265

12661266
static void pvscsi_realize(DeviceState *qdev, Error **errp)
12671267
{
1268-
PVSCSIClass *pvs_c = PVSCSI_DEVICE_GET_CLASS(qdev);
1268+
PVSCSIClass *pvs_c = PVSCSI_GET_CLASS(qdev);
12691269
PCIDevice *pci_dev = PCI_DEVICE(qdev);
12701270
PVSCSIState *s = PVSCSI(qdev);
12711271

@@ -1280,7 +1280,7 @@ static void pvscsi_class_init(ObjectClass *klass, void *data)
12801280
{
12811281
DeviceClass *dc = DEVICE_CLASS(klass);
12821282
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
1283-
PVSCSIClass *pvs_k = PVSCSI_DEVICE_CLASS(klass);
1283+
PVSCSIClass *pvs_k = PVSCSI_CLASS(klass);
12841284
HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass);
12851285

12861286
k->realize = pvscsi_realizefn;

0 commit comments

Comments
 (0)