Skip to content

Commit

Permalink
hw/hyperv: Constify VMState
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-30-richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Dec 29, 2023
1 parent 3b9e779 commit 2ebfd1c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions hw/hyperv/vmbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static const VMStateDescription vmstate_gpadl = {
.name = "vmbus/gpadl",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(id, VMBusGpadl),
VMSTATE_UINT32(child_relid, VMBusGpadl),
VMSTATE_UINT32(num_gfns, VMBusGpadl),
Expand Down Expand Up @@ -1489,7 +1489,7 @@ static const VMStateDescription vmstate_channel = {
.version_id = 0,
.minimum_version_id = 0,
.post_load = channel_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(id, VMBusChannel),
VMSTATE_UINT16(subchan_idx, VMBusChannel),
VMSTATE_UINT32(open_id, VMBusChannel),
Expand Down Expand Up @@ -2380,7 +2380,7 @@ const VMStateDescription vmstate_vmbus_dev = {
.name = TYPE_VMBUS_DEVICE,
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8_ARRAY(instanceid.data, VMBusDevice, 16),
VMSTATE_UINT16(num_channels, VMBusDevice),
VMSTATE_STRUCT_VARRAY_POINTER_UINT16(channels, VMBusDevice,
Expand Down Expand Up @@ -2549,7 +2549,7 @@ static const VMStateDescription vmstate_post_message_input = {
.name = "vmbus/hyperv_post_message_input",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
/*
* skip connection_id and message_type as they are validated before
* queueing and ignored on dequeueing
Expand All @@ -2572,7 +2572,7 @@ static const VMStateDescription vmstate_rx_queue = {
.version_id = 0,
.minimum_version_id = 0,
.needed = vmbus_rx_queue_needed,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(rx_queue_head, VMBus),
VMSTATE_UINT8(rx_queue_size, VMBus),
VMSTATE_STRUCT_ARRAY(rx_queue, VMBus,
Expand All @@ -2589,7 +2589,7 @@ static const VMStateDescription vmstate_vmbus = {
.minimum_version_id = 0,
.pre_load = vmbus_pre_load,
.post_load = vmbus_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT8(state, VMBus),
VMSTATE_UINT32(version, VMBus),
VMSTATE_UINT32(target_vp, VMBus),
Expand All @@ -2598,7 +2598,7 @@ static const VMStateDescription vmstate_vmbus = {
vmstate_gpadl, VMBusGpadl, link),
VMSTATE_END_OF_LIST()
},
.subsections = (const VMStateDescription * []) {
.subsections = (const VMStateDescription * const []) {
&vmstate_rx_queue,
NULL
}
Expand Down Expand Up @@ -2643,7 +2643,7 @@ static const VMStateDescription vmstate_vmbus_bridge = {
.name = TYPE_VMBUS_BRIDGE,
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_STRUCT_POINTER(bus, VMBusBridge, vmstate_vmbus, VMBus),
VMSTATE_END_OF_LIST()
},
Expand Down

0 comments on commit 2ebfd1c

Please sign in to comment.