diff mbox series

[17/71] target/sparc: Constify VMState in machine.c

Message ID 20231106065827.543129-18-richard.henderson@linaro.org
State Superseded
Headers show
Series *: Constify VMState | expand

Commit Message

Richard Henderson Nov. 6, 2023, 6:57 a.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/sparc/machine.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Mark Cave-Ayland Nov. 6, 2023, 10:05 p.m. UTC | #1
On 06/11/2023 06:57, Richard Henderson wrote:

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/sparc/machine.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/target/sparc/machine.c b/target/sparc/machine.c
> index 274e1217df..b1b1e16b13 100644
> --- a/target/sparc/machine.c
> +++ b/target/sparc/machine.c
> @@ -10,7 +10,7 @@ static const VMStateDescription vmstate_cpu_timer = {
>       .name = "cpu_timer",
>       .version_id = 1,
>       .minimum_version_id = 1,
> -    .fields = (VMStateField[]) {
> +    .fields = (const VMStateField[]) {
>           VMSTATE_UINT32(frequency, CPUTimer),
>           VMSTATE_UINT32(disabled, CPUTimer),
>           VMSTATE_UINT64(disabled_mask, CPUTimer),
> @@ -29,7 +29,7 @@ static const VMStateDescription vmstate_trap_state = {
>       .name = "trap_state",
>       .version_id = 1,
>       .minimum_version_id = 1,
> -    .fields = (VMStateField[]) {
> +    .fields = (const VMStateField[]) {
>           VMSTATE_UINT64(tpc, trap_state),
>           VMSTATE_UINT64(tnpc, trap_state),
>           VMSTATE_UINT64(tstate, trap_state),
> @@ -42,7 +42,7 @@ static const VMStateDescription vmstate_tlb_entry = {
>       .name = "tlb_entry",
>       .version_id = 1,
>       .minimum_version_id = 1,
> -    .fields = (VMStateField[]) {
> +    .fields = (const VMStateField[]) {
>           VMSTATE_UINT64(tag, SparcTLBEntry),
>           VMSTATE_UINT64(tte, SparcTLBEntry),
>           VMSTATE_END_OF_LIST()
> @@ -111,7 +111,7 @@ const VMStateDescription vmstate_sparc_cpu = {
>       .version_id = SPARC_VMSTATE_VER,
>       .minimum_version_id = SPARC_VMSTATE_VER,
>       .pre_save = cpu_pre_save,
> -    .fields = (VMStateField[]) {
> +    .fields = (const VMStateField[]) {
>           VMSTATE_UINTTL_ARRAY(env.gregs, SPARCCPU, 8),
>           VMSTATE_UINT32(env.nwindows, SPARCCPU),
>           VMSTATE_VARRAY_MULTIPLY(env.regbase, SPARCCPU, env.nwindows, 16,

Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


ATB,

Mark.
diff mbox series

Patch

diff --git a/target/sparc/machine.c b/target/sparc/machine.c
index 274e1217df..b1b1e16b13 100644
--- a/target/sparc/machine.c
+++ b/target/sparc/machine.c
@@ -10,7 +10,7 @@  static const VMStateDescription vmstate_cpu_timer = {
     .name = "cpu_timer",
     .version_id = 1,
     .minimum_version_id = 1,
-    .fields = (VMStateField[]) {
+    .fields = (const VMStateField[]) {
         VMSTATE_UINT32(frequency, CPUTimer),
         VMSTATE_UINT32(disabled, CPUTimer),
         VMSTATE_UINT64(disabled_mask, CPUTimer),
@@ -29,7 +29,7 @@  static const VMStateDescription vmstate_trap_state = {
     .name = "trap_state",
     .version_id = 1,
     .minimum_version_id = 1,
-    .fields = (VMStateField[]) {
+    .fields = (const VMStateField[]) {
         VMSTATE_UINT64(tpc, trap_state),
         VMSTATE_UINT64(tnpc, trap_state),
         VMSTATE_UINT64(tstate, trap_state),
@@ -42,7 +42,7 @@  static const VMStateDescription vmstate_tlb_entry = {
     .name = "tlb_entry",
     .version_id = 1,
     .minimum_version_id = 1,
-    .fields = (VMStateField[]) {
+    .fields = (const VMStateField[]) {
         VMSTATE_UINT64(tag, SparcTLBEntry),
         VMSTATE_UINT64(tte, SparcTLBEntry),
         VMSTATE_END_OF_LIST()
@@ -111,7 +111,7 @@  const VMStateDescription vmstate_sparc_cpu = {
     .version_id = SPARC_VMSTATE_VER,
     .minimum_version_id = SPARC_VMSTATE_VER,
     .pre_save = cpu_pre_save,
-    .fields = (VMStateField[]) {
+    .fields = (const VMStateField[]) {
         VMSTATE_UINTTL_ARRAY(env.gregs, SPARCCPU, 8),
         VMSTATE_UINT32(env.nwindows, SPARCCPU),
         VMSTATE_VARRAY_MULTIPLY(env.regbase, SPARCCPU, env.nwindows, 16,