[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 24/32] machine: Constify MachineClass::valid_cpu_types[i]
From: |
Gavin Shan |
Subject: |
[PATCH v3 24/32] machine: Constify MachineClass::valid_cpu_types[i] |
Date: |
Thu, 7 Sep 2023 10:35:45 +1000 |
Constify MachineClass::valid_cpu_types[i], as suggested by Richard
Henderson.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Gavin Shan <gshan@redhat.com>
---
hw/m68k/q800.c | 2 +-
include/hw/boards.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index b770b71d54..45f2b58b26 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -596,7 +596,7 @@ static GlobalProperty hw_compat_q800[] = {
};
static const size_t hw_compat_q800_len = G_N_ELEMENTS(hw_compat_q800);
-static const char *q800_machine_valid_cpu_types[] = {
+static const char * const q800_machine_valid_cpu_types[] = {
M68K_CPU_TYPE_NAME("m68040"),
NULL
};
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 3b541ffd24..49c328d928 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -268,7 +268,7 @@ struct MachineClass {
bool has_hotpluggable_cpus;
bool ignore_memory_transaction_failures;
int numa_mem_align_shift;
- const char **valid_cpu_types;
+ const char * const *valid_cpu_types;
strList *allowed_dynamic_sysbus_devices;
bool auto_enable_numa_with_memhp;
bool auto_enable_numa_with_memdev;
--
2.41.0
- Re: [PATCH v3 15/32] target/s390x: Use generic helper to show CPU model names, (continued)
- [PATCH v3 16/32] target/sh4: Use generic helper to show CPU model names, Gavin Shan, 2023/09/06
- [PATCH v3 17/32] target/tricore: Use generic helper to show CPU model names, Gavin Shan, 2023/09/06
- [PATCH v3 18/32] target/sparc: Improve sparc_cpu_class_by_name(), Gavin Shan, 2023/09/06
- [PATCH v3 19/32] target/xtensa: Improve xtensa_cpu_class_by_name(), Gavin Shan, 2023/09/06
- [PATCH v3 20/32] target/hppa: Implement hppa_cpu_list(), Gavin Shan, 2023/09/06
- [PATCH v3 21/32] target/microblaze: Implement microblaze_cpu_list(), Gavin Shan, 2023/09/06
- [PATCH v3 22/32] target/nios2: Implement nios2_cpu_list(), Gavin Shan, 2023/09/06
- [PATCH v3 23/32] Mark cpu_list() supported on all targets, Gavin Shan, 2023/09/06
- [PATCH v3 24/32] machine: Constify MachineClass::valid_cpu_types[i],
Gavin Shan <=
- [PATCH v3 25/32] machine: Use error handling when CPU type is checked, Gavin Shan, 2023/09/06
- [PATCH v3 26/32] machine: Introduce helper is_cpu_type_supported(), Gavin Shan, 2023/09/06
- [PATCH v3 27/32] machine: Print CPU model name instead of CPU type name, Gavin Shan, 2023/09/06
[PATCH v3 28/32] hw/arm/virt: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/09/06