[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/46] hw/ppc/pnv_xscom: Rename pnv_xscom_realize(Error **) -> pnv
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 24/46] hw/ppc/pnv_xscom: Rename pnv_xscom_realize(Error **) -> pnv_xscom_init() |
Date: |
Thu, 19 Oct 2023 23:17:49 +0200 |
pnv_xscom_realize() is not used to *realize* QDev object, rename
it as pnv_xscom_init(). The Error** argument is unused: remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20231019131647.19690-3-philmd@linaro.org>
---
include/hw/ppc/pnv_xscom.h | 2 +-
hw/ppc/pnv.c | 18 +++---------------
hw/ppc/pnv_xscom.c | 2 +-
3 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h
index 9bc6463547..41671001da 100644
--- a/include/hw/ppc/pnv_xscom.h
+++ b/include/hw/ppc/pnv_xscom.h
@@ -170,7 +170,7 @@ struct PnvXScomInterfaceClass {
#define PNV10_XSCOM_PEC_PCI_BASE 0x8010800 /* index goes upwards ... */
#define PNV10_XSCOM_PEC_PCI_SIZE 0x200
-void pnv_xscom_realize(PnvChip *chip, uint64_t size, Error **errp);
+void pnv_xscom_init(PnvChip *chip, uint64_t size);
int pnv_dt_xscom(PnvChip *chip, void *fdt, int root_offset,
uint64_t xscom_base, uint64_t xscom_size,
const char *compat, int compat_size);
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index eb54f93986..456631c9dc 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -1249,11 +1249,7 @@ static void pnv_chip_power8_realize(DeviceState *dev,
Error **errp)
assert(chip8->xics);
/* XSCOM bridge is first */
- pnv_xscom_realize(chip, PNV_XSCOM_SIZE, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- return;
- }
+ pnv_xscom_init(chip, PNV_XSCOM_SIZE);
sysbus_mmio_map(SYS_BUS_DEVICE(chip), 0, PNV_XSCOM_BASE(chip));
pcc->parent_realize(dev, &local_err);
@@ -1512,11 +1508,7 @@ static void pnv_chip_power9_realize(DeviceState *dev,
Error **errp)
Error *local_err = NULL;
/* XSCOM bridge is first */
- pnv_xscom_realize(chip, PNV9_XSCOM_SIZE, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- return;
- }
+ pnv_xscom_init(chip, PNV9_XSCOM_SIZE);
sysbus_mmio_map(SYS_BUS_DEVICE(chip), 0, PNV9_XSCOM_BASE(chip));
pcc->parent_realize(dev, &local_err);
@@ -1727,11 +1719,7 @@ static void pnv_chip_power10_realize(DeviceState *dev,
Error **errp)
Error *local_err = NULL;
/* XSCOM bridge is first */
- pnv_xscom_realize(chip, PNV10_XSCOM_SIZE, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- return;
- }
+ pnv_xscom_init(chip, PNV10_XSCOM_SIZE);
sysbus_mmio_map(SYS_BUS_DEVICE(chip), 0, PNV10_XSCOM_BASE(chip));
pcc->parent_realize(dev, &local_err);
diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
index d820e05e40..af57b55863 100644
--- a/hw/ppc/pnv_xscom.c
+++ b/hw/ppc/pnv_xscom.c
@@ -221,7 +221,7 @@ const MemoryRegionOps pnv_xscom_ops = {
.endianness = DEVICE_BIG_ENDIAN,
};
-void pnv_xscom_realize(PnvChip *chip, uint64_t size, Error **errp)
+void pnv_xscom_init(PnvChip *chip, uint64_t size)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(chip);
char *name;
--
2.41.0
- [PULL 14/46] hw/misc/mips_itu: Make MIPSITUState target agnostic, (continued)
- [PULL 14/46] hw/misc/mips_itu: Make MIPSITUState target agnostic, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 15/46] hw/pci-host/sh_pcic: Declare CPU QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 16/46] hw/pci-host/sh_pcic: Correct PCI host / devfn#0 function names, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 17/46] hw/pci-host/sh_pcic: Replace magic value by proper definition, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 18/46] hw/sparc64/ebus: Access memory regions via pci_address_space_io(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 19/46] hw/acpi/pcihp: Clean up global variable shadowing in acpi_pcihp_init(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 20/46] hw/pci: Clean up global variable shadowing of address_space_io variable, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 21/46] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 22/46] hw/intc/apic: Use ERRP_GUARD() in apic_common_realize(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 23/46] hw/ppc/spapr_vio: Realize SPAPR_VIO_BRIDGE device before accessing it, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 24/46] hw/ppc/pnv_xscom: Rename pnv_xscom_realize(Error **) -> pnv_xscom_init(),
Philippe Mathieu-Daudé <=
- [PULL 25/46] hw/ppc/pnv_xscom: Move sysbus_mmio_map() call within pnv_xscom_init(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 26/46] hw/ppc/pnv_xscom: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 27/46] hw/ppc/pnv: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 28/46] hw/intc/spapr_xive: Move sysbus_init_mmio() calls around, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 29/46] hw/intc/spapr_xive: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 30/46] hw/audio/pcspk: Inline pcspk_init(), Philippe Mathieu-Daudé, 2023/10/19
- [PULL 31/46] hw/i386/amd_iommu: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 32/46] hw/i386/intel_iommu: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 33/46] hw/misc/allwinner-dramc: Move sysbus_mmio_map call from init -> realize, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 34/46] hw/misc/allwinner-dramc: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19