[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/53] ahci: Move QOM macros to header
From: |
Eduardo Habkost |
Subject: |
[PULL 29/53] ahci: Move QOM macros to header |
Date: |
Thu, 27 Aug 2020 15:20:58 -0400 |
The TYPE_* constants and the typedefs are defined in ahci.h, so
we can move the type checking macros there too.
This will make future conversion to OBJECT_DECLARE* easier.
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-31-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/ide/ahci_internal.h | 5 -----
include/hw/ide/ahci.h | 3 +++
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h
index bab0459774..ac9bdead7b 100644
--- a/hw/ide/ahci_internal.h
+++ b/hw/ide/ahci_internal.h
@@ -332,9 +332,6 @@ struct AHCIPCIState {
AHCIState ahci;
};
-#define ICH_AHCI(obj) \
- OBJECT_CHECK(AHCIPCIState, (obj), TYPE_ICH9_AHCI)
-
extern const VMStateDescription vmstate_ahci;
#define VMSTATE_AHCI(_field, _state) { \
@@ -394,6 +391,4 @@ void ahci_uninit(AHCIState *s);
void ahci_reset(AHCIState *s);
-#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
-
#endif /* HW_IDE_AHCI_INTERNAL_H */
diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h
index b44e3000cf..ce2bf8a5f8 100644
--- a/include/hw/ide/ahci.h
+++ b/include/hw/ide/ahci.h
@@ -53,11 +53,14 @@ typedef struct AHCIState {
typedef struct AHCIPCIState AHCIPCIState;
#define TYPE_ICH9_AHCI "ich9-ahci"
+#define ICH_AHCI(obj) \
+ OBJECT_CHECK(AHCIPCIState, (obj), TYPE_ICH9_AHCI)
int32_t ahci_get_num_ports(PCIDevice *dev);
void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd);
#define TYPE_SYSBUS_AHCI "sysbus-ahci"
+#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
typedef struct SysbusAHCIState {
/*< private >*/
--
2.26.2
- [PULL 16/53] pci: Move PCIBusClass typedef to pci.h, (continued)
- [PULL 16/53] pci: Move PCIBusClass typedef to pci.h, Eduardo Habkost, 2020/08/27
- [PULL 18/53] hvf: Move HVFState typedef to hvf.h, Eduardo Habkost, 2020/08/27
- [PULL 20/53] s390_flic: Move KVMS390FLICState typedef to header, Eduardo Habkost, 2020/08/27
- [PULL 22/53] nubus: Delete unused NUBUS_BRIDGE macro, Eduardo Habkost, 2020/08/27
- [PULL 21/53] can_emu: Delete macros for non-existing typedef, Eduardo Habkost, 2020/08/27
- [PULL 23/53] platform-bus: Delete macros for non-existing typedef, Eduardo Habkost, 2020/08/27
- [PULL 25/53] xen-legacy-backend: Add missing typedef XenLegacyDevice, Eduardo Habkost, 2020/08/27
- [PULL 26/53] spapr: Move typedef SpaprMachineState to spapr.h, Eduardo Habkost, 2020/08/27
- [PULL 27/53] s390x: Move typedef SCLPEventFacility to event-facility.h, Eduardo Habkost, 2020/08/27
- [PULL 28/53] vhost-user-gpu: Move QOM macro to header, Eduardo Habkost, 2020/08/27
- [PULL 29/53] ahci: Move QOM macros to header,
Eduardo Habkost <=
- [PULL 24/53] armsse: Rename QOM macros to avoid conflicts, Eduardo Habkost, 2020/08/27
- [PULL 30/53] i8257: Move QOM macro to header, Eduardo Habkost, 2020/08/27
- [PULL 31/53] ahci: Move QOM macro to header, Eduardo Habkost, 2020/08/27
- [PULL 32/53] pckbd: Move QOM macro to header, Eduardo Habkost, 2020/08/27
- [PULL 33/53] vmbus: Move QOM macros to vmbus.h, Eduardo Habkost, 2020/08/27
- [PULL 37/53] rocker: Move QOM macros to header, Eduardo Habkost, 2020/08/27
- [PULL 34/53] virtio-serial-bus: Move QOM macros to header, Eduardo Habkost, 2020/08/27
- [PULL 36/53] auxbus: Move QOM macros to header, Eduardo Habkost, 2020/08/27
- [PULL 35/53] piix: Move QOM macros to header, Eduardo Habkost, 2020/08/27
- [PULL 38/53] pxa2xx: Move QOM macros to header, Eduardo Habkost, 2020/08/27