[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 23/31] machine: Constify MachineClass::valid_cpu_types[i]
From: |
Gavin Shan |
Subject: |
[PATCH v5 23/31] machine: Constify MachineClass::valid_cpu_types[i] |
Date: |
Wed, 15 Nov 2023 09:56:20 +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>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
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 1d7cd5ff1c..38d4bc2013 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -726,7 +726,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 a735999298..da85f86efb 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -273,7 +273,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 v5 17/31] target/riscv: Use generic cpu_list(), (continued)
- [PATCH v5 18/31] target/rx: Use generic cpu_list(), Gavin Shan, 2023/11/14
- [PATCH v5 19/31] target/sh4: Use generic cpu_list(), Gavin Shan, 2023/11/14
- [PATCH v5 21/31] target/xtensa: Use generic cpu_list(), Gavin Shan, 2023/11/14
- [PATCH v5 20/31] target/tricore: Use generic cpu_list(), Gavin Shan, 2023/11/14
- [PATCH v5 22/31] target: Use generic cpu_model_from_type(), Gavin Shan, 2023/11/14
- [PATCH v5 23/31] machine: Constify MachineClass::valid_cpu_types[i],
Gavin Shan <=
- [PATCH v5 24/31] machine: Use error handling when CPU type is checked, Gavin Shan, 2023/11/14
- [PATCH v5 25/31] machine: Introduce helper is_cpu_type_supported(), Gavin Shan, 2023/11/14
- [PATCH v5 27/31] hw/arm/virt: Hide host CPU model for tcg, Gavin Shan, 2023/11/14
- [PATCH v5 26/31] machine: Print CPU model name instead of CPU type name, Gavin Shan, 2023/11/14
- [PATCH v5 28/31] hw/arm/virt: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/14
- [PATCH v5 29/31] hw/arm/sbsa-ref: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/14
- [PATCH v5 30/31] hw/arm: Check CPU type in machine_run_board_init(), Gavin Shan, 2023/11/14