]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
hw/vfio: Constify VMState
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 21 Dec 2023 03:16:40 +0000 (14:16 +1100)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 29 Dec 2023 20:38:06 +0000 (07:38 +1100)
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>

hw/vfio/display.c
hw/vfio/pci.c

index 7a10fa8604aa54cdc31f1c82e05b50d43e15ae5e..1aa440c66340d491178ff5704f30c4cc49476707 100644 (file)
@@ -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(),
     }
index 1874ec1aba987cac6cb83f86650e7a5e1968c327..9f838978bea11cacf95b0907c76ac0879a6313bf 100644 (file)
@@ -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()
@@ -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
     }