Message ID | 20230907003553.1636896-25-gshan@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Unified CPU type check | expand |
On 7/9/23 02:35, Gavin Shan wrote: > 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(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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;
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(-)