Skip to content

Commit

Permalink
hw/core: Constify VMState
Browse files Browse the repository at this point in the history
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-20-richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Dec 29, 2023
1 parent 607ef57 commit f55f1a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions hw/core/clock-vmstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const VMStateDescription vmstate_muldiv = {
.version_id = 1,
.minimum_version_id = 1,
.needed = muldiv_needed,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(multiplier, Clock),
VMSTATE_UINT32(divider, Clock),
VMSTATE_END_OF_LIST()
Expand All @@ -53,11 +53,11 @@ const VMStateDescription vmstate_clock = {
.version_id = 0,
.minimum_version_id = 0,
.pre_load = clock_pre_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT64(period, Clock),
VMSTATE_END_OF_LIST()
},
.subsections = (const VMStateDescription*[]) {
.subsections = (const VMStateDescription * const []) {
&vmstate_muldiv,
NULL
},
Expand Down
6 changes: 3 additions & 3 deletions hw/core/or-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static const VMStateDescription vmstate_or_irq_extras = {
.version_id = 1,
.minimum_version_id = 1,
.needed = vmstate_extras_needed,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_VARRAY_UINT16_UNSAFE(levels, OrIRQState, num_lines, 0,
vmstate_info_bool, bool),
VMSTATE_END_OF_LIST(),
Expand All @@ -105,11 +105,11 @@ static const VMStateDescription vmstate_or_irq = {
.name = TYPE_OR_IRQ,
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_BOOL_SUB_ARRAY(levels, OrIRQState, 0, OLD_MAX_OR_LINES),
VMSTATE_END_OF_LIST(),
},
.subsections = (const VMStateDescription*[]) {
.subsections = (const VMStateDescription * const []) {
&vmstate_or_irq_extras,
NULL
},
Expand Down
2 changes: 1 addition & 1 deletion hw/core/ptimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ const VMStateDescription vmstate_ptimer = {
.name = "ptimer",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(enabled, ptimer_state),
VMSTATE_UINT64(limit, ptimer_state),
VMSTATE_UINT64(delta, ptimer_state),
Expand Down

0 comments on commit f55f1a4

Please sign in to comment.