From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX09V-00072o-OX for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:23:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WX09P-0008Rj-Iq for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:23:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX09P-0008Re-B3 for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:23:11 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s373NAZM005504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 6 Apr 2014 23:23:10 -0400 From: Juan Quintela Date: Mon, 7 Apr 2014 05:21:10 +0200 Message-Id: <1396840915-10384-53-git-send-email-quintela@redhat.com> In-Reply-To: <1396840915-10384-1-git-send-email-quintela@redhat.com> References: <1396840915-10384-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH 52/97] vmstate: Move VMSTATE_2DARRAY to use _test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org No user used versions, so easy to change. Signed-off-by: Juan Quintela --- include/migration/vmstate.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 6d5073a..db70163 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -211,14 +211,14 @@ extern const VMStateInfo vmstate_info_bitmap; .offset = vmstate_offset_value(_state, _field, _type), \ } -#define VMSTATE_2DARRAY(_field, _state, _n1, _n2, _version, _info, _type) { \ - .name = (stringify(_field)), \ - .version_id = (_version), \ - .num = (_n1) * (_n2), \ - .info = &(_info), \ - .size = sizeof(_type), \ - .flags = VMS_ARRAY, \ - .offset = vmstate_offset_2darray(_state, _field, _type, _n1, _n2), \ +#define VMSTATE_2DARRAY(_field, _state, _n1, _n2, _test, _info, _type) { \ + .name = (stringify(_field)), \ + .field_exists = (_test), \ + .num = (_n1) * (_n2), \ + .info = &(_info), \ + .size = sizeof(_type), \ + .flags = VMS_ARRAY, \ + .offset = vmstate_offset_2darray(_state, _field, _type, _n1, _n2), \ } #define VMSTATE_ARRAY_TEST(_field, _state, _num, _test, _info, _type) {\ @@ -603,13 +603,13 @@ extern const VMStateInfo vmstate_info_bitmap; VMSTATE_ARRAY_TEST(_f, _s, _n, NULL, vmstate_info_float64, float64) #define VMSTATE_UINT8_2DARRAY(_f, _s, _n1, _n2) \ - VMSTATE_2DARRAY(_f, _s, _n1, _n2, 0, vmstate_info_uint8, uint8_t) + VMSTATE_2DARRAY(_f, _s, _n1, _n2, NULL, vmstate_info_uint8, uint8_t) #define VMSTATE_UINT16_2DARRAY(_f, _s, _n1, _n2) \ - VMSTATE_2DARRAY(_f, _s, _n1, _n2, 0, vmstate_info_uint16, uint16_t) + VMSTATE_2DARRAY(_f, _s, _n1, _n2, NULL, 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) + VMSTATE_2DARRAY(_f, _s, _n1, _n2, NULL, 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) -- 1.9.0