Skip to content

Commit

Permalink
hw/vfio: Constify VMState
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Message-Id: <20231221031652.119827-60-richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Dec 29, 2023
1 parent 3abedf2 commit 65bd53e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hw/vfio/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ const VMStateDescription vfio_display_vmstate = {
.version_id = 1,
.minimum_version_id = 1,
.needed = migrate_needed,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_STRUCT_POINTER(ramfb, VFIODisplay, ramfb_vmstate, RAMFBState),
VMSTATE_END_OF_LIST(),
}
Expand Down
6 changes: 3 additions & 3 deletions hw/vfio/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2561,7 +2561,7 @@ const VMStateDescription vmstate_vfio_display = {
.version_id = 1,
.minimum_version_id = 1,
.needed = vfio_display_migration_needed,
.fields = (VMStateField[]){
.fields = (const VMStateField[]){
VMSTATE_STRUCT_POINTER(dpy, VFIOPCIDevice, vfio_display_vmstate,
VFIODisplay),
VMSTATE_END_OF_LIST()
Expand All @@ -2572,12 +2572,12 @@ const VMStateDescription vmstate_vfio_pci_config = {
.name = "VFIOPCIDevice",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(pdev, VFIOPCIDevice),
VMSTATE_MSIX_TEST(pdev, VFIOPCIDevice, vfio_msix_present),
VMSTATE_END_OF_LIST()
},
.subsections = (const VMStateDescription * []) {
.subsections = (const VMStateDescription * const []) {
&vmstate_vfio_display,
NULL
}
Expand Down

0 comments on commit 65bd53e

Please sign in to comment.