[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 49/71] hw/ppc: Constify all Property
From: |
Richard Henderson |
Subject: |
[PATCH 49/71] hw/ppc: Constify all Property |
Date: |
Fri, 13 Dec 2024 13:07:23 -0600 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/ppc/pnv.c | 2 +-
hw/ppc/pnv_adu.c | 2 +-
hw/ppc/pnv_chiptod.c | 2 +-
hw/ppc/pnv_core.c | 4 ++--
hw/ppc/pnv_homer.c | 2 +-
hw/ppc/pnv_i2c.c | 2 +-
hw/ppc/pnv_lpc.c | 2 +-
hw/ppc/pnv_pnor.c | 2 +-
hw/ppc/pnv_psi.c | 2 +-
hw/ppc/ppc405_uc.c | 2 +-
hw/ppc/ppc440_uc.c | 2 +-
hw/ppc/ppc4xx_devs.c | 4 ++--
hw/ppc/ppc4xx_sdram.c | 4 ++--
hw/ppc/prep_systemio.c | 2 +-
hw/ppc/rs6000_mc.c | 2 +-
hw/ppc/spapr_cpu_core.c | 2 +-
hw/ppc/spapr_nvdimm.c | 2 +-
hw/ppc/spapr_pci.c | 2 +-
hw/ppc/spapr_rng.c | 2 +-
hw/ppc/spapr_tpm_proxy.c | 2 +-
20 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index f0f0d7567d..b90a052ce0 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -2422,7 +2422,7 @@ static void pnv_chip_realize(DeviceState *dev, Error
**errp)
}
}
-static Property pnv_chip_properties[] = {
+static const Property pnv_chip_properties[] = {
DEFINE_PROP_UINT32("chip-id", PnvChip, chip_id, 0),
DEFINE_PROP_UINT64("ram-start", PnvChip, ram_start, 0),
DEFINE_PROP_UINT64("ram-size", PnvChip, ram_size, 0),
diff --git a/hw/ppc/pnv_adu.c b/hw/ppc/pnv_adu.c
index f636dedf79..646736f7e9 100644
--- a/hw/ppc/pnv_adu.c
+++ b/hw/ppc/pnv_adu.c
@@ -185,7 +185,7 @@ static void pnv_adu_realize(DeviceState *dev, Error **errp)
PNV9_XSCOM_ADU_SIZE);
}
-static Property pnv_adu_properties[] = {
+static const Property pnv_adu_properties[] = {
DEFINE_PROP_LINK("lpc", PnvADU, lpc, TYPE_PNV_LPC, PnvLpcController *),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/pnv_chiptod.c b/hw/ppc/pnv_chiptod.c
index 1e41fe557a..840ef23128 100644
--- a/hw/ppc/pnv_chiptod.c
+++ b/hw/ppc/pnv_chiptod.c
@@ -450,7 +450,7 @@ static int pnv_chiptod_power9_dt_xscom(PnvXScomInterface
*dev, void *fdt,
return pnv_chiptod_dt_xscom(dev, fdt, xscom_offset, compat,
sizeof(compat));
}
-static Property pnv_chiptod_properties[] = {
+static const Property pnv_chiptod_properties[] = {
DEFINE_PROP_BOOL("primary", PnvChipTOD, primary, false),
DEFINE_PROP_BOOL("secondary", PnvChipTOD, secondary, false),
DEFINE_PROP_LINK("chip", PnvChipTOD , chip, TYPE_PNV_CHIP, PnvChip *),
diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
index e6b02294b1..22864c92f3 100644
--- a/hw/ppc/pnv_core.c
+++ b/hw/ppc/pnv_core.c
@@ -435,7 +435,7 @@ static void pnv_core_unrealize(DeviceState *dev)
g_free(pc->threads);
}
-static Property pnv_core_properties[] = {
+static const Property pnv_core_properties[] = {
DEFINE_PROP_UINT32("hwid", PnvCore, hwid, 0),
DEFINE_PROP_UINT64("hrmor", PnvCore, hrmor, 0),
DEFINE_PROP_BOOL("big-core", PnvCore, big_core, false),
@@ -693,7 +693,7 @@ static void pnv_quad_power10_realize(DeviceState *dev,
Error **errp)
pqc->xscom_qme_size);
}
-static Property pnv_quad_properties[] = {
+static const Property pnv_quad_properties[] = {
DEFINE_PROP_UINT32("quad-id", PnvQuad, quad_id, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/pnv_homer.c b/hw/ppc/pnv_homer.c
index f9a203d11d..b1f83e2cf2 100644
--- a/hw/ppc/pnv_homer.c
+++ b/hw/ppc/pnv_homer.c
@@ -412,7 +412,7 @@ static void pnv_homer_realize(DeviceState *dev, Error
**errp)
hmrc->homer_size);
}
-static Property pnv_homer_properties[] = {
+static const Property pnv_homer_properties[] = {
DEFINE_PROP_LINK("chip", PnvHomer, chip, TYPE_PNV_CHIP, PnvChip *),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/pnv_i2c.c b/hw/ppc/pnv_i2c.c
index eec5047ce8..4bd61abeed 100644
--- a/hw/ppc/pnv_i2c.c
+++ b/hw/ppc/pnv_i2c.c
@@ -543,7 +543,7 @@ static void pnv_i2c_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_out(DEVICE(dev), &i2c->psi_irq, 1);
}
-static Property pnv_i2c_properties[] = {
+static const Property pnv_i2c_properties[] = {
DEFINE_PROP_LINK("chip", PnvI2C, chip, TYPE_PNV_CHIP, PnvChip *),
DEFINE_PROP_UINT32("engine", PnvI2C, engine, 1),
DEFINE_PROP_UINT32("num-busses", PnvI2C, num_busses, 1),
diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c
index 8c203d2059..4d47167163 100644
--- a/hw/ppc/pnv_lpc.c
+++ b/hw/ppc/pnv_lpc.c
@@ -828,7 +828,7 @@ static void pnv_lpc_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_out_named(dev, &lpc->psi_irq_lpchc, "LPCHC", 1);
}
-static Property pnv_lpc_properties[] = {
+static const Property pnv_lpc_properties[] = {
DEFINE_PROP_BOOL("psi-serirq", PnvLpcController, psi_has_serirq, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/pnv_pnor.c b/hw/ppc/pnv_pnor.c
index 6280408299..eed6d32650 100644
--- a/hw/ppc/pnv_pnor.c
+++ b/hw/ppc/pnv_pnor.c
@@ -112,7 +112,7 @@ static void pnv_pnor_realize(DeviceState *dev, Error **errp)
TYPE_PNV_PNOR, s->size);
}
-static Property pnv_pnor_properties[] = {
+static const Property pnv_pnor_properties[] = {
DEFINE_PROP_INT64("size", PnvPnor, size, 128 * MiB),
DEFINE_PROP_DRIVE("drive", PnvPnor, blk),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
index 37c56882b8..e7d6ceee99 100644
--- a/hw/ppc/pnv_psi.c
+++ b/hw/ppc/pnv_psi.c
@@ -552,7 +552,7 @@ static int pnv_psi_dt_xscom(PnvXScomInterface *dev, void
*fdt, int xscom_offset)
return 0;
}
-static Property pnv_psi_properties[] = {
+static const Property pnv_psi_properties[] = {
DEFINE_PROP_UINT64("bar", PnvPsi, bar, 0),
DEFINE_PROP_UINT64("fsp-bar", PnvPsi, fsp_bar, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c
index 58cbd0507a..801f97811f 100644
--- a/hw/ppc/ppc405_uc.c
+++ b/hw/ppc/ppc405_uc.c
@@ -965,7 +965,7 @@ static void ppc405_cpc_realize(DeviceState *dev, Error
**errp)
&dcr_read_epcpc, &dcr_write_epcpc);
}
-static Property ppc405_cpc_properties[] = {
+static const Property ppc405_cpc_properties[] = {
DEFINE_PROP_UINT32("sys-clk", Ppc405CpcState, sysclk, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c
index 1312aa2080..05a5ef6f77 100644
--- a/hw/ppc/ppc440_uc.c
+++ b/hw/ppc/ppc440_uc.c
@@ -1020,7 +1020,7 @@ static void ppc460ex_pcie_realize(DeviceState *dev, Error
**errp)
ppc460ex_pcie_register_dcrs(s);
}
-static Property ppc460ex_pcie_props[] = {
+static const Property ppc460ex_pcie_props[] = {
DEFINE_PROP_INT32("busnum", PPC460EXPCIEState, num, -1),
DEFINE_PROP_INT32("dcrn-base", PPC460EXPCIEState, dcrn_base, -1),
DEFINE_PROP_LINK("cpu", PPC460EXPCIEState, cpu, TYPE_POWERPC_CPU,
diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c
index db8f6b9497..530a392f2a 100644
--- a/hw/ppc/ppc4xx_devs.c
+++ b/hw/ppc/ppc4xx_devs.c
@@ -231,7 +231,7 @@ static void ppc4xx_mal_finalize(Object *obj)
g_free(mal->txctpr);
}
-static Property ppc4xx_mal_properties[] = {
+static const Property ppc4xx_mal_properties[] = {
DEFINE_PROP_UINT8("txc-num", Ppc4xxMalState, txcnum, 0),
DEFINE_PROP_UINT8("rxc-num", Ppc4xxMalState, rxcnum, 0),
DEFINE_PROP_END_OF_LIST(),
@@ -539,7 +539,7 @@ bool ppc4xx_dcr_realize(Ppc4xxDcrDeviceState *dev,
PowerPCCPU *cpu,
return sysbus_realize(SYS_BUS_DEVICE(dev), errp);
}
-static Property ppc4xx_dcr_properties[] = {
+static const Property ppc4xx_dcr_properties[] = {
DEFINE_PROP_LINK("cpu", Ppc4xxDcrDeviceState, cpu, TYPE_POWERPC_CPU,
PowerPCCPU *),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/ppc/ppc4xx_sdram.c b/hw/ppc/ppc4xx_sdram.c
index 2ee21f1ca7..6cfb07a11f 100644
--- a/hw/ppc/ppc4xx_sdram.c
+++ b/hw/ppc/ppc4xx_sdram.c
@@ -425,7 +425,7 @@ static void ppc4xx_sdram_ddr_realize(DeviceState *dev,
Error **errp)
s, &sdram_ddr_dcr_read, &sdram_ddr_dcr_write);
}
-static Property ppc4xx_sdram_ddr_props[] = {
+static const Property ppc4xx_sdram_ddr_props[] = {
DEFINE_PROP_LINK("dram", Ppc4xxSdramDdrState, dram_mr, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_UINT32("nbanks", Ppc4xxSdramDdrState, nbanks, 4),
@@ -710,7 +710,7 @@ static void ppc4xx_sdram_ddr2_realize(DeviceState *dev,
Error **errp)
s, &sdram_ddr2_dcr_read, &sdram_ddr2_dcr_write);
}
-static Property ppc4xx_sdram_ddr2_props[] = {
+static const Property ppc4xx_sdram_ddr2_props[] = {
DEFINE_PROP_LINK("dram", Ppc4xxSdramDdr2State, dram_mr, TYPE_MEMORY_REGION,
MemoryRegion *),
DEFINE_PROP_UINT32("nbanks", Ppc4xxSdramDdr2State, nbanks, 4),
diff --git a/hw/ppc/prep_systemio.c b/hw/ppc/prep_systemio.c
index 4d3a251ed8..ca475c69f4 100644
--- a/hw/ppc/prep_systemio.c
+++ b/hw/ppc/prep_systemio.c
@@ -285,7 +285,7 @@ static const VMStateDescription vmstate_prep_systemio = {
},
};
-static Property prep_systemio_properties[] = {
+static const Property prep_systemio_properties[] = {
DEFINE_PROP_UINT8("ibm-planar-id", PrepSystemIoState, ibm_planar_id, 0),
DEFINE_PROP_UINT8("equipment", PrepSystemIoState, equipment, 0),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/ppc/rs6000_mc.c b/hw/ppc/rs6000_mc.c
index 07b0b664d9..bee9bc62d4 100644
--- a/hw/ppc/rs6000_mc.c
+++ b/hw/ppc/rs6000_mc.c
@@ -207,7 +207,7 @@ static const VMStateDescription vmstate_rs6000mc = {
},
};
-static Property rs6000mc_properties[] = {
+static const Property rs6000mc_properties[] = {
DEFINE_PROP_UINT32("ram-size", RS6000MCState, ram_size, 0),
DEFINE_PROP_BOOL("auto-configure", RS6000MCState, autoconfigure, true),
DEFINE_PROP_END_OF_LIST()
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 135f86a622..88d743a3c3 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -361,7 +361,7 @@ static void spapr_cpu_core_realize(DeviceState *dev, Error
**errp)
}
}
-static Property spapr_cpu_core_properties[] = {
+static const Property spapr_cpu_core_properties[] = {
DEFINE_PROP_INT32("node-id", SpaprCpuCore, node_id,
CPU_UNSET_NUMA_NODE_ID),
DEFINE_PROP_END_OF_LIST()
};
diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c
index 7d2dfe5e3d..2ef6f29f3d 100644
--- a/hw/ppc/spapr_nvdimm.c
+++ b/hw/ppc/spapr_nvdimm.c
@@ -884,7 +884,7 @@ static void spapr_nvdimm_unrealize(NVDIMMDevice *dimm)
vmstate_unregister(NULL, &vmstate_spapr_nvdimm_states, dimm);
}
-static Property spapr_nvdimm_properties[] = {
+static const Property spapr_nvdimm_properties[] = {
#ifdef CONFIG_LIBPMEM
DEFINE_PROP_BOOL("pmem-override", SpaprNVDIMMDevice, pmem_override, false),
#endif
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 7e24084673..3edff528ca 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -2033,7 +2033,7 @@ static void spapr_phb_reset(DeviceState *qdev)
g_hash_table_remove_all(sphb->msi);
}
-static Property spapr_phb_properties[] = {
+static const Property spapr_phb_properties[] = {
DEFINE_PROP_UINT32("index", SpaprPhbState, index, -1),
DEFINE_PROP_UINT64("mem_win_size", SpaprPhbState, mem_win_size,
SPAPR_PCI_MEM32_WIN_SIZE),
diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c
index c2fda7ad20..51c3a54d45 100644
--- a/hw/ppc/spapr_rng.c
+++ b/hw/ppc/spapr_rng.c
@@ -130,7 +130,7 @@ static void spapr_rng_realize(DeviceState *dev, Error
**errp)
}
}
-static Property spapr_rng_properties[] = {
+static const Property spapr_rng_properties[] = {
DEFINE_PROP_BOOL("use-kvm", SpaprRngState, use_kvm, false),
DEFINE_PROP_LINK("rng", SpaprRngState, backend, TYPE_RNG_BACKEND,
RngBackend *),
diff --git a/hw/ppc/spapr_tpm_proxy.c b/hw/ppc/spapr_tpm_proxy.c
index e10af35a18..37521b88cb 100644
--- a/hw/ppc/spapr_tpm_proxy.c
+++ b/hw/ppc/spapr_tpm_proxy.c
@@ -145,7 +145,7 @@ static void spapr_tpm_proxy_unrealize(DeviceState *d)
qemu_unregister_reset(spapr_tpm_proxy_reset, tpm_proxy);
}
-static Property spapr_tpm_proxy_properties[] = {
+static const Property spapr_tpm_proxy_properties[] = {
DEFINE_PROP_STRING("host-path", SpaprTpmProxy, host_path),
DEFINE_PROP_END_OF_LIST(),
};
--
2.43.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 49/71] hw/ppc: Constify all Property,
Richard Henderson <=