[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/53] pci: Move PCIBusClass typedef to pci.h
From: |
Eduardo Habkost |
Subject: |
[PULL 16/53] pci: Move PCIBusClass typedef to pci.h |
Date: |
Thu, 27 Aug 2020 15:20:45 -0400 |
Move typedef closer to the type check macros, to make it easier
to convert the code to OBJECT_DEFINE_TYPE() in the future.
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-18-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
include/hw/pci/pci.h | 1 +
include/hw/pci/pci_bus.h | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index c1bf7d5356..4ca7258b5b 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -396,6 +396,7 @@ typedef int (*pci_map_irq_fn)(PCIDevice *pci_dev, int
irq_num);
typedef PCIINTxRoute (*pci_route_irq_fn)(void *opaque, int pin);
#define TYPE_PCI_BUS "PCI"
+typedef struct PCIBusClass PCIBusClass;
#define PCI_BUS(obj) OBJECT_CHECK(PCIBus, (obj), TYPE_PCI_BUS)
#define PCI_BUS_CLASS(klass) OBJECT_CLASS_CHECK(PCIBusClass, (klass),
TYPE_PCI_BUS)
#define PCI_BUS_GET_CLASS(obj) OBJECT_GET_CLASS(PCIBusClass, (obj),
TYPE_PCI_BUS)
diff --git a/include/hw/pci/pci_bus.h b/include/hw/pci/pci_bus.h
index 0714f578af..347440d42c 100644
--- a/include/hw/pci/pci_bus.h
+++ b/include/hw/pci/pci_bus.h
@@ -10,14 +10,14 @@
* use accessor functions in pci.h
*/
-typedef struct PCIBusClass {
+struct PCIBusClass {
/*< private >*/
BusClass parent_class;
/*< public >*/
int (*bus_num)(PCIBus *bus);
uint16_t (*numa_node)(PCIBus *bus);
-} PCIBusClass;
+};
enum PCIBusFlags {
/* This bus is the root of a PCI domain */
--
2.26.2
- [PULL 08/53] opentitan: Rename memmap enum constants, (continued)
- [PULL 08/53] opentitan: Rename memmap enum constants, Eduardo Habkost, 2020/08/27
- [PULL 10/53] versatile: Fix typo in PCI_VPB_HOST definition, Eduardo Habkost, 2020/08/27
- [PULL 07/53] aspeed_soc: Rename memmap/irqmap enum constants, Eduardo Habkost, 2020/08/27
- [PULL 11/53] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS, Eduardo Habkost, 2020/08/27
- [PULL 12/53] hvf: Add missing include, Eduardo Habkost, 2020/08/27
- [PULL 14/53] tulip: Move TulipState typedef to header, Eduardo Habkost, 2020/08/27
- [PULL 15/53] throttle-groups: Move ThrottleGroup typedef to header, Eduardo Habkost, 2020/08/27
- [PULL 17/53] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h, Eduardo Habkost, 2020/08/27
- [PULL 19/53] mcf_fec: Move mcf_fec_state typedef to header, Eduardo Habkost, 2020/08/27
- [PULL 13/53] hcd-dwc2: Rename USB_*CLASS macros for consistency, Eduardo Habkost, 2020/08/27
- [PULL 16/53] pci: Move PCIBusClass typedef to pci.h,
Eduardo Habkost <=
- [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, 2020/08/27