aboutsummaryrefslogtreecommitdiff
path: root/cpu-target.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-12-21 14:16:46 +1100
committerRichard Henderson <richard.henderson@linaro.org>2023-12-30 07:38:06 +1100
commitee1381ce764a88753a1276e9f85f72be62eb6fa2 (patch)
treec022b797249fcb838a62b6c8b7182db591147bc5 /cpu-target.c
parentd349d5ab398fcf6f4bb3368abc14ef7ce6ba9afc (diff)
cpu-target: Constify VMState
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20231221031652.119827-66-richard.henderson@linaro.org>
Diffstat (limited to 'cpu-target.c')
-rw-r--r--cpu-target.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpu-target.c b/cpu-target.c
index 508013e23d..430dc53566 100644
--- a/cpu-target.c
+++ b/cpu-target.c
@@ -87,7 +87,7 @@ static const VMStateDescription vmstate_cpu_common_exception_index = {
.version_id = 1,
.minimum_version_id = 1,
.needed = cpu_common_exception_index_needed,
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
VMSTATE_INT32(exception_index, CPUState),
VMSTATE_END_OF_LIST()
}
@@ -105,7 +105,7 @@ static const VMStateDescription vmstate_cpu_common_crash_occurred = {
.version_id = 1,
.minimum_version_id = 1,
.needed = cpu_common_crash_occurred_needed,
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
VMSTATE_BOOL(crash_occurred, CPUState),
VMSTATE_END_OF_LIST()
}
@@ -117,12 +117,12 @@ const VMStateDescription vmstate_cpu_common = {
.minimum_version_id = 1,
.pre_load = cpu_common_pre_load,
.post_load = cpu_common_post_load,
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
VMSTATE_UINT32(halted, CPUState),
VMSTATE_UINT32(interrupt_request, CPUState),
VMSTATE_END_OF_LIST()
},
- .subsections = (const VMStateDescription*[]) {
+ .subsections = (const VMStateDescription * const []) {
&vmstate_cpu_common_exception_index,
&vmstate_cpu_common_crash_occurred,
NULL