]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
include/hw/cxl: Move typedef PXBDev to cxl.h, and put it to use
authorMarkus Armbruster <armbru@redhat.com>
Thu, 22 Dec 2022 10:03:25 +0000 (11:03 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 8 Jan 2023 06:54:22 +0000 (01:54 -0500)
hw/cxl/cxl.h uses the PXBDev structure tag instead of the typedef
name.  The typedef name is defined in hw/pci/pci_bridge.h.  Its
inclusion was dropped in the previous commit to break an inclusion
loop.

Move the typedef to hw/cxl/cxl.h, and use it there.  Delete an extra
typedef in hw/pci-bridge/pci_expander_bridge.c.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221222100330.380143-3-armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci-bridge/pci_expander_bridge.c
include/hw/cxl/cxl.h
include/hw/pci/pci_bridge.h

index c9e817aa58662bad2db54b2bb60462fc90a5ddba..870d9bab1193c63da2f4a6bee6082cb25963ef76 100644 (file)
@@ -50,7 +50,6 @@ struct PXBBus {
 };
 
 #define TYPE_PXB_DEVICE "pxb"
-typedef struct PXBDev PXBDev;
 DECLARE_INSTANCE_CHECKER(PXBDev, PXB_DEV,
                          TYPE_PXB_DEVICE)
 
index 5129557beeaeebf949f9c24307e9c057846bda5f..b161be59b7b16cff95ad4506b4fe0ac3db4a5f84 100644 (file)
 
 #define CXL_WINDOW_MAX 10
 
+typedef struct PXBDev PXBDev;
+
 typedef struct CXLFixedWindow {
     uint64_t size;
     char **targets;
-    struct PXBDev *target_hbs[8];
+    PXBDev *target_hbs[8];
     uint8_t num_targets;
     uint8_t enc_int_ways;
     uint8_t enc_int_gran;
index ca6caf487e69d765ebd9e0eed89cff20d43f03c4..58a3fb0c2c8f5753cd997378398092028e132422 100644 (file)
@@ -97,7 +97,6 @@ struct PXBDev {
     } cxl;
 };
 
-typedef struct PXBDev PXBDev;
 #define TYPE_PXB_CXL_DEVICE "pxb-cxl"
 DECLARE_INSTANCE_CHECKER(PXBDev, PXB_CXL_DEV,
                          TYPE_PXB_CXL_DEVICE)