Remove unused _V version. Signed-off-by: Juan Quintela <quint...@redhat.com> --- include/migration/vmstate.h | 9 +++------ tests/test-vmstate.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 14c905a..e7ceb59 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -645,15 +645,12 @@ extern const VMStateInfo vmstate_info_bitmap; #define VMSTATE_UINT16_2DARRAY(_f, _s, _n1, _n2) \ VMSTATE_2DARRAY(_f, _s, _n1, _n2, 0, vmstate_info_uint16, uint16_t) +#define VMSTATE_UINT32_2DARRAY(_f, _s, _n1, _n2) \ + VMSTATE_2DARRAY(_f, _s, _n1, _n2, 0, vmstate_info_uint32, uint32_t) + #define VMSTATE_UINT8_SUB_ARRAY(_f, _s, _start, _num) \ VMSTATE_SUB_ARRAY(_f, _s, _start, _num, 0, vmstate_info_uint8, uint8_t) -#define VMSTATE_UINT32_2DARRAY_V(_f, _s, _n1, _n2, _v) \ - VMSTATE_2DARRAY(_f, _s, _n1, _n2, _v, vmstate_info_uint32, uint32_t) - -#define VMSTATE_UINT32_2DARRAY(_f, _s, _n1, _n2) \ - VMSTATE_UINT32_2DARRAY_V(_f, _s, _n1, _n2, 0) - #define VMSTATE_UINT32_SUB_ARRAY(_f, _s, _start, _num) \ VMSTATE_SUB_ARRAY(_f, _s, _start, _num, 0, vmstate_info_uint32, uint32_t) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index d0f6d4b..f51c887 100644 --- a/tests/test-vmstate.c +++ b/tests/test-vmstate.c @@ -555,6 +555,7 @@ typedef struct TestArray { float64 f64_1[VMSTATE_ARRAY_SIZE]; uint8_t u8_1d[VMSTATE_2D_SIZE][VMSTATE_2D_SIZE]; uint16_t u16_1d[VMSTATE_2D_SIZE][VMSTATE_2D_SIZE]; + uint32_t u32_1d[VMSTATE_2D_SIZE][VMSTATE_2D_SIZE]; } TestArray; TestArray obj_array = { @@ -580,6 +581,9 @@ TestArray obj_array = { .u16_1d = { {81, 82, 83}, {84, 85, 86}, {87, 88, 89} }, + .u32_1d = { {91, 92, 93}, + {94, 95, 96}, + {97, 98, 99} }, }; static const VMStateDescription vmstate_array_primitive = { @@ -602,6 +606,8 @@ static const VMStateDescription vmstate_array_primitive = { VMSTATE_2D_SIZE), VMSTATE_UINT16_2DARRAY(u16_1d, TestArray, VMSTATE_2D_SIZE, VMSTATE_2D_SIZE), + VMSTATE_UINT32_2DARRAY(u32_1d, TestArray, VMSTATE_2D_SIZE, + VMSTATE_2D_SIZE), VMSTATE_END_OF_LIST() } }; @@ -639,6 +645,15 @@ uint8_t wire_array_primitive[] = { /* u16_1d */0x00, 0x51, 0x00, 0x52, 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, + /* u16_1d */0x00, 0x00, 0x00, 0x5b, + 0x00, 0x00, 0x00, 0x5c, + 0x00, 0x00, 0x00, 0x5d, + 0x00, 0x00, 0x00, 0x5e, + 0x00, 0x00, 0x00, 0x5f, + 0x00, 0x00, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x61, + 0x00, 0x00, 0x00, 0x62, + 0x00, 0x00, 0x00, 0x63, QEMU_VM_EOF, /* just to ensure we won't get EOF reported prematurely */ }; @@ -709,6 +724,7 @@ static void test_array_primitive(void) for (j = 0; j < VMSTATE_2D_SIZE; j++) { ELEM_ASSERT_2D(u8_1d, i, j); ELEM_ASSERT_2D(u16_1d, i, j); + ELEM_ASSERT_2D(u32_1d, i, j); } } -- 1.9.0