diff mbox

[053/124] vmstate: Port last 3 users of VMSTATE_ARRAY to VMSTATE_ARRAY_TEST

Message ID 1398091304-10677-54-git-send-email-quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela April 21, 2014, 2:40 p.m. UTC
And then remove VMSTATE_ARRAY.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/net/vmxnet3.c            | 13 +++++++------
 include/migration/vmstate.h | 10 ----------
 2 files changed, 7 insertions(+), 16 deletions(-)
diff mbox

Patch

diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index d8e8d59..1faf58d 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -2457,14 +2457,15 @@  static const VMStateDescription vmstate_vmxnet3 = {
             VMSTATE_UINT64(drv_shmem, VMXNET3State),
             VMSTATE_UINT64(temp_shared_guest_driver_memory, VMXNET3State),

-            VMSTATE_ARRAY(txq_descr, VMXNET3State,
-                VMXNET3_DEVICE_MAX_TX_QUEUES, 0, txq_descr_info,
+            VMSTATE_ARRAY_TEST(txq_descr, VMXNET3State,
+                VMXNET3_DEVICE_MAX_TX_QUEUES, NULL, txq_descr_info,
                 Vmxnet3TxqDescr),
-            VMSTATE_ARRAY(rxq_descr, VMXNET3State,
-                VMXNET3_DEVICE_MAX_RX_QUEUES, 0, rxq_descr_info,
+            VMSTATE_ARRAY_TEST(rxq_descr, VMXNET3State,
+                VMXNET3_DEVICE_MAX_RX_QUEUES, NULL, rxq_descr_info,
                 Vmxnet3RxqDescr),
-            VMSTATE_ARRAY(interrupt_states, VMXNET3State, VMXNET3_MAX_INTRS,
-                0, int_state_info, Vmxnet3IntState),
+            VMSTATE_ARRAY_TEST(interrupt_states, VMXNET3State,
+                VMXNET3_MAX_INTRS, NULL, int_state_info,
+                Vmxnet3IntState),

             VMSTATE_END_OF_LIST()
     },
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index f0c99d9..60b67dc 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -221,16 +221,6 @@  extern const VMStateInfo vmstate_info_bitmap;
     .offset     = vmstate_offset_value(_state, _field, _type),       \
 }

-#define VMSTATE_ARRAY(_field, _state, _num, _version, _info, _type) {\
-    .name       = (stringify(_field)),                               \
-    .version_id = (_version),                                        \
-    .num        = (_num),                                            \
-    .info       = &(_info),                                          \
-    .size       = sizeof(_type),                                     \
-    .flags      = VMS_ARRAY,                                         \
-    .offset     = vmstate_offset_array(_state, _field, _type, _num), \
-}
-
 #define VMSTATE_2DARRAY(_field, _state, _n1, _n2, _version, _info, _type) { \
     .name       = (stringify(_field)),                                      \
     .version_id = (_version),                                               \