aboutsummaryrefslogtreecommitdiff
path: root/hw/mem
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2022-01-17 15:58:04 +0100
committerPeter Maydell <peter.maydell@linaro.org>2022-02-21 13:30:20 +0000
commit5e78c98b7cc98619d2740c7c5030aa56fb22e79f (patch)
tree33ab1b4e7c8694b87fe88a75e7cfbc57fbde8557 /hw/mem
parent7f6c295cdfeaa229c360cac9a36e4e595aa902ae (diff)
downloadqemu-5e78c98b7cc98619d2740c7c5030aa56fb22e79f.zip
qemu-5e78c98b7cc98619d2740c7c5030aa56fb22e79f.tar.gz
qemu-5e78c98b7cc98619d2740c7c5030aa56fb22e79f.tar.bz2
Mark remaining global TypeInfo instances as const
More than 1k of TypeInfo instances are already marked as const. Mark the remaining ones, too. This commit was created with: git grep -z -l 'static TypeInfo' -- '*.c' | \ xargs -0 sed -i 's/static TypeInfo/static const TypeInfo/' Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Corey Minyard <cminyard@mvista.com> Message-id: 20220117145805.173070-2-shentey@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/mem')
-rw-r--r--hw/mem/nvdimm.c2
-rw-r--r--hw/mem/pc-dimm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
index 59959d5..7c7d777 100644
--- a/hw/mem/nvdimm.c
+++ b/hw/mem/nvdimm.c
@@ -264,7 +264,7 @@ static void nvdimm_class_init(ObjectClass *oc, void *data)
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}
-static TypeInfo nvdimm_info = {
+static const TypeInfo nvdimm_info = {
.name = TYPE_NVDIMM,
.parent = TYPE_PC_DIMM,
.class_size = sizeof(NVDIMMClass),
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 03bd0dd..f27e1a1 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -291,7 +291,7 @@ static void pc_dimm_class_init(ObjectClass *oc, void *data)
mdc->fill_device_info = pc_dimm_md_fill_device_info;
}
-static TypeInfo pc_dimm_info = {
+static const TypeInfo pc_dimm_info = {
.name = TYPE_PC_DIMM,
.parent = TYPE_DEVICE,
.instance_size = sizeof(PCDIMMDevice),