]> git.proxmox.com Git - mirror_qemu.git/commitdiff
include/hw/ppc include/hw/pci-host: Drop extra typedefs
authorMarkus Armbruster <armbru@redhat.com>
Thu, 22 Dec 2022 10:46:28 +0000 (11:46 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 20 Jan 2023 06:25:22 +0000 (07:25 +0100)
PnvChip is typedef'ed in five places, and PnvPhb4PecState in two.
Keep one, drop the others.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20221222104628.659681-5-armbru@redhat.com>

hw/pci-host/pnv_phb.h
include/hw/pci-host/pnv_phb3.h
include/hw/pci-host/pnv_phb4.h
include/hw/ppc/pnv_core.h
include/hw/ppc/pnv_homer.h
include/hw/ppc/pnv_lpc.h
include/hw/ppc/pnv_xive.h

index 58ebd6dd0ff71bbd196549da72d8834233461fdb..eb429d529f88c2c81e21ae0371d34a3448acddbb 100644 (file)
@@ -12,9 +12,9 @@
 
 #include "hw/pci/pcie_host.h"
 #include "hw/pci/pcie_port.h"
+#include "hw/ppc/pnv.h"
 #include "qom/object.h"
 
-typedef struct PnvChip PnvChip;
 typedef struct PnvPhb4PecState PnvPhb4PecState;
 
 struct PnvPHB {
index f791ebda9be4b165c19abed22d18da20dbaaf9fc..d62b3091ac81df7a717c2e48d3c1f7e1f6fc6fa2 100644 (file)
@@ -15,7 +15,6 @@
 #include "hw/pci-host/pnv_phb.h"
 
 typedef struct PnvPHB3 PnvPHB3;
-typedef struct PnvChip PnvChip;
 
 /*
  * PHB3 XICS Source for MSIs
index b4f2b29fb53a156c0da6aef9086957ddfd3f9f9f..1f3237c9d5220090ea0c8610a76015c4e830b728 100644 (file)
 #include "hw/ppc/xive.h"
 #include "qom/object.h"
 
-typedef struct PnvPhb4PecState PnvPhb4PecState;
 typedef struct PnvPhb4PecStack PnvPhb4PecStack;
 typedef struct PnvPHB4 PnvPHB4;
-typedef struct PnvChip PnvChip;
 
 /*
  * We have one such address space wrapper per possible device under
index c22eab2e1f69df5c199f92ed9437af7dbcc62151..3d75706e95dad06f2b1a618ef7acff736d3ad379 100644 (file)
 
 #include "hw/cpu/core.h"
 #include "target/ppc/cpu.h"
+#include "hw/ppc/pnv.h"
 #include "qom/object.h"
 
 #define TYPE_PNV_CORE "powernv-cpu-core"
 OBJECT_DECLARE_TYPE(PnvCore, PnvCoreClass,
                     PNV_CORE)
 
-typedef struct PnvChip PnvChip;
-
 struct PnvCore {
     /*< private >*/
     CPUCore parent_obj;
index 07e8b193116ef0a655904badb3680fd35a620b97..b1c5d498dc5559a1cad44d419703a98881ef5402 100644 (file)
@@ -39,7 +39,7 @@ DECLARE_INSTANCE_CHECKER(PnvHomer, PNV10_HOMER,
 struct PnvHomer {
     DeviceState parent;
 
-    struct PnvChip *chip;
+    PnvChip *chip;
     MemoryRegion pba_regs;
     MemoryRegion regs;
 };
index 001eee27d77053859a5af5e751078ebe73380339..5d22c45570410445bd43a1dde247947842154d2d 100644 (file)
@@ -21,6 +21,7 @@
 #define PPC_PNV_LPC_H
 
 #include "exec/memory.h"
+#include "hw/ppc/pnv.h"
 #include "hw/qdev-core.h"
 
 #define TYPE_PNV_LPC "pnv-lpc"
@@ -93,13 +94,8 @@ struct PnvLpcClass {
     DeviceRealize parent_realize;
 };
 
-/*
- * Old compilers error on typdef forward declarations. Keep them happy.
- */
-struct PnvChip;
-
 ISABus *pnv_lpc_isa_create(PnvLpcController *lpc, bool use_cpld, Error **errp);
-int pnv_dt_lpc(struct PnvChip *chip, void *fdt, int root_offset,
+int pnv_dt_lpc(PnvChip *chip, void *fdt, int root_offset,
                uint64_t lpcm_addr, uint64_t lpcm_size);
 
 #endif /* PPC_PNV_LPC_H */
index b5d91505e53cc7c05954033fdf0ebf300fa4125b..9c48430ee4181f2b9bbbfbb4c18946e030f34b91 100644 (file)
 #ifndef PPC_PNV_XIVE_H
 #define PPC_PNV_XIVE_H
 
+#include "hw/ppc/pnv.h"
 #include "hw/ppc/xive.h"
 #include "qom/object.h"
 #include "hw/ppc/xive2.h"
 
-struct PnvChip;
-
 #define TYPE_PNV_XIVE "pnv-xive"
 OBJECT_DECLARE_TYPE(PnvXive, PnvXiveClass,
                     PNV_XIVE)
@@ -31,7 +30,7 @@ struct PnvXive {
     XiveRouter    parent_obj;
 
     /* Owning chip */
-    struct PnvChip *chip;
+    PnvChip *chip;
 
     /* XSCOM addresses giving access to the controller registers */
     MemoryRegion  xscom_regs;
@@ -106,7 +105,7 @@ typedef struct PnvXive2 {
     Xive2Router   parent_obj;
 
     /* Owning chip */
-    struct PnvChip *chip;
+    PnvChip *chip;
 
     /* XSCOM addresses giving access to the controller registers */
     MemoryRegion  xscom_regs;