aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-bridge
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-31 17:07:33 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-09 09:27:09 -0400
commit8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch)
tree6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /hw/pci-bridge
parentdb1015e92e04835c9eb50c29625fe566d1202dbd (diff)
downloadqemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.zip
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.gz
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.bz2
Use DECLARE_*CHECKER* macros
Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-12-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-13-ehabkost@redhat.com> Message-Id: <20200831210740.126168-14-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/pci-bridge')
-rw-r--r--hw/pci-bridge/dec.c3
-rw-r--r--hw/pci-bridge/gen_pcie_root_port.c4
-rw-r--r--hw/pci-bridge/pci_bridge_dev.c4
-rw-r--r--hw/pci-bridge/pci_expander_bridge.c12
-rw-r--r--hw/pci-bridge/pcie_pci_bridge.c4
5 files changed, 16 insertions, 11 deletions
diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c
index b35866d..e88998d 100644
--- a/hw/pci-bridge/dec.c
+++ b/hw/pci-bridge/dec.c
@@ -35,7 +35,8 @@
#include "qom/object.h"
typedef struct DECState DECState;
-#define DEC_21154(obj) OBJECT_CHECK(DECState, (obj), TYPE_DEC_21154)
+DECLARE_INSTANCE_CHECKER(DECState, DEC_21154,
+ TYPE_DEC_21154)
struct DECState {
PCIHostState parent_obj;
diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_root_port.c
index b62e20a..67c71d5 100644
--- a/hw/pci-bridge/gen_pcie_root_port.c
+++ b/hw/pci-bridge/gen_pcie_root_port.c
@@ -21,8 +21,8 @@
#define TYPE_GEN_PCIE_ROOT_PORT "pcie-root-port"
typedef struct GenPCIERootPort GenPCIERootPort;
-#define GEN_PCIE_ROOT_PORT(obj) \
- OBJECT_CHECK(GenPCIERootPort, (obj), TYPE_GEN_PCIE_ROOT_PORT)
+DECLARE_INSTANCE_CHECKER(GenPCIERootPort, GEN_PCIE_ROOT_PORT,
+ TYPE_GEN_PCIE_ROOT_PORT)
#define GEN_PCIE_ROOT_PORT_AER_OFFSET 0x100
#define GEN_PCIE_ROOT_PORT_ACS_OFFSET \
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index bd1b10c..b86d76c 100644
--- a/hw/pci-bridge/pci_bridge_dev.c
+++ b/hw/pci-bridge/pci_bridge_dev.c
@@ -36,8 +36,8 @@
#define TYPE_PCI_BRIDGE_DEV "pci-bridge"
#define TYPE_PCI_BRIDGE_SEAT_DEV "pci-bridge-seat"
typedef struct PCIBridgeDev PCIBridgeDev;
-#define PCI_BRIDGE_DEV(obj) \
- OBJECT_CHECK(PCIBridgeDev, (obj), TYPE_PCI_BRIDGE_DEV)
+DECLARE_INSTANCE_CHECKER(PCIBridgeDev, PCI_BRIDGE_DEV,
+ TYPE_PCI_BRIDGE_DEV)
struct PCIBridgeDev {
/*< private >*/
diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c
index 4a31ee3..aedded1 100644
--- a/hw/pci-bridge/pci_expander_bridge.c
+++ b/hw/pci-bridge/pci_expander_bridge.c
@@ -26,10 +26,12 @@
#define TYPE_PXB_BUS "pxb-bus"
typedef struct PXBBus PXBBus;
-#define PXB_BUS(obj) OBJECT_CHECK(PXBBus, (obj), TYPE_PXB_BUS)
+DECLARE_INSTANCE_CHECKER(PXBBus, PXB_BUS,
+ TYPE_PXB_BUS)
#define TYPE_PXB_PCIE_BUS "pxb-pcie-bus"
-#define PXB_PCIE_BUS(obj) OBJECT_CHECK(PXBBus, (obj), TYPE_PXB_PCIE_BUS)
+DECLARE_INSTANCE_CHECKER(PXBBus, PXB_PCIE_BUS,
+ TYPE_PXB_PCIE_BUS)
struct PXBBus {
/*< private >*/
@@ -41,10 +43,12 @@ struct PXBBus {
#define TYPE_PXB_DEVICE "pxb"
typedef struct PXBDev PXBDev;
-#define PXB_DEV(obj) OBJECT_CHECK(PXBDev, (obj), TYPE_PXB_DEVICE)
+DECLARE_INSTANCE_CHECKER(PXBDev, PXB_DEV,
+ TYPE_PXB_DEVICE)
#define TYPE_PXB_PCIE_DEVICE "pxb-pcie"
-#define PXB_PCIE_DEV(obj) OBJECT_CHECK(PXBDev, (obj), TYPE_PXB_PCIE_DEVICE)
+DECLARE_INSTANCE_CHECKER(PXBDev, PXB_PCIE_DEV,
+ TYPE_PXB_PCIE_DEVICE)
struct PXBDev {
/*< private >*/
diff --git a/hw/pci-bridge/pcie_pci_bridge.c b/hw/pci-bridge/pcie_pci_bridge.c
index 1178cd8..abc98f8 100644
--- a/hw/pci-bridge/pcie_pci_bridge.c
+++ b/hw/pci-bridge/pcie_pci_bridge.c
@@ -30,8 +30,8 @@ struct PCIEPCIBridge {
typedef struct PCIEPCIBridge PCIEPCIBridge;
#define TYPE_PCIE_PCI_BRIDGE_DEV "pcie-pci-bridge"
-#define PCIE_PCI_BRIDGE_DEV(obj) \
- OBJECT_CHECK(PCIEPCIBridge, (obj), TYPE_PCIE_PCI_BRIDGE_DEV)
+DECLARE_INSTANCE_CHECKER(PCIEPCIBridge, PCIE_PCI_BRIDGE_DEV,
+ TYPE_PCIE_PCI_BRIDGE_DEV)
static void pcie_pci_bridge_realize(PCIDevice *d, Error **errp)
{