From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX09U-00070n-Ae for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:23:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WX09O-0008RU-3F for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:23:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX09N-0008RL-Rq for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:23:10 -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 s373N9N8027219 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 6 Apr 2014 23:23:09 -0400 From: Juan Quintela Date: Mon, 7 Apr 2014 05:21:09 +0200 Message-Id: <1396840915-10384-52-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 51/97] vmstate: Rename VMSTATE_SINGLE_TEST to VMSTATE_SINGLE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org And as no user used the version_id, just remove the parameter. Signed-off-by: Juan Quintela --- hw/nvram/eeprom93xx.c | 2 +- hw/nvram/fw_cfg.c | 2 +- hw/timer/twl92230.c | 2 +- include/migration/vmstate.h | 36 +++++++++++++++++------------------- target-i386/machine.c | 2 +- 5 files changed, 21 insertions(+), 23 deletions(-) diff --git a/hw/nvram/eeprom93xx.c b/hw/nvram/eeprom93xx.c index d07bafb..7e09037 100644 --- a/hw/nvram/eeprom93xx.c +++ b/hw/nvram/eeprom93xx.c @@ -114,7 +114,7 @@ static const VMStateInfo vmstate_hack_uint16_from_uint8 = { }; #define VMSTATE_UINT16_HACK_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_hack_uint16_from_uint8, uint16_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_hack_uint16_from_uint8, uint16_t) static bool is_old_eeprom_version(void *opaque, int version_id) { diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index 8ea3ac8..97218c7 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -365,7 +365,7 @@ static const VMStateInfo vmstate_hack_uint32_as_uint16 = { }; #define VMSTATE_UINT16_HACK(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_hack_uint32_as_uint16, uint32_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_hack_uint32_as_uint16, uint32_t) static bool is_version_1(void *opaque, int version_id) diff --git a/hw/timer/twl92230.c b/hw/timer/twl92230.c index 3aacaeb..26c6001 100644 --- a/hw/timer/twl92230.c +++ b/hw/timer/twl92230.c @@ -765,7 +765,7 @@ static const VMStateInfo vmstate_hack_int32_as_uint16 = { }; #define VMSTATE_UINT16_HACK(_f, _s) \ - VMSTATE_SINGLE_TEST(_f, _s, NULL, 0, vmstate_hack_int32_as_uint16, int32_t) + VMSTATE_SINGLE(_f, _s, NULL, vmstate_hack_int32_as_uint16, int32_t) static const VMStateDescription vmstate_menelaus_tm = { diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 141187c..6d5073a 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -193,9 +193,8 @@ extern const VMStateInfo vmstate_info_bitmap; vmstate_offset_array(_state, _field, uint8_t, \ sizeof(typeof_field(_state, _field))) -#define VMSTATE_SINGLE_TEST(_field, _state, _test, _version, _info, _type) { \ +#define VMSTATE_SINGLE(_field, _state, _test, _info, _type) { \ .name = (stringify(_field)), \ - .version_id = (_version), \ .field_exists = (_test), \ .size = sizeof(_type), \ .info = &(_info), \ @@ -491,25 +490,24 @@ extern const VMStateInfo vmstate_info_bitmap; _vmsd, _type) #define VMSTATE_BOOL_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_bool, bool) + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_bool, bool) #define VMSTATE_INT8_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int8, int8_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_int8, int8_t) #define VMSTATE_INT16_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int16, int16_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_int16, int16_t) #define VMSTATE_INT32_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int32, int32_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_int32, int32_t) #define VMSTATE_INT64_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_int64, int64_t) - + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_int64, int64_t) #define VMSTATE_UINT8_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint8, uint8_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_uint8, uint8_t) #define VMSTATE_UINT16_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint16, uint16_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_uint16, uint16_t) #define VMSTATE_UINT32_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint32, uint32_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_uint32, uint32_t) #define VMSTATE_UINT64_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint64, uint64_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_uint64, uint64_t) #define VMSTATE_BOOL(_f, _s) \ VMSTATE_BOOL_TEST(_f, _s, NULL) @@ -533,28 +531,28 @@ extern const VMStateInfo vmstate_info_bitmap; VMSTATE_UINT64_TEST(_f, _s, NULL) #define VMSTATE_UINT8_EQUAL(_f, _s) \ - VMSTATE_SINGLE_TEST(_f, _s, NULL, 0, vmstate_info_uint8_equal, uint8_t) + VMSTATE_SINGLE(_f, _s, NULL, vmstate_info_uint8_equal, uint8_t) #define VMSTATE_UINT16_EQUAL_TEST(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint16_equal, uint16_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_info_uint16_equal, uint16_t) #define VMSTATE_UINT16_EQUAL(_f, _s) \ VMSTATE_UINT16_EQUAL_TEST(_f, _s, NULL) #define VMSTATE_UINT32_EQUAL(_f, _s) \ - VMSTATE_SINGLE_TEST(_f, _s, NULL, 0, vmstate_info_uint32_equal, uint32_t) + VMSTATE_SINGLE(_f, _s, NULL, vmstate_info_uint32_equal, uint32_t) #define VMSTATE_UINT64_EQUAL(_f, _s) \ - VMSTATE_SINGLE_TEST(_f, _s, NULL, 0, vmstate_info_uint64_equal, uint64_t) + VMSTATE_SINGLE(_f, _s, NULL, vmstate_info_uint64_equal, uint64_t) #define VMSTATE_INT32_EQUAL(_f, _s) \ - VMSTATE_SINGLE_TEST(_f, _s, NULL, 0, vmstate_info_int32_equal, int32_t) + VMSTATE_SINGLE(_f, _s, NULL, vmstate_info_int32_equal, int32_t) #define VMSTATE_INT32_POSITIVE_LE(_f, _s) \ - VMSTATE_SINGLE_TEST(_f, _s, NULL, 0, vmstate_info_int32_le, int32_t) + VMSTATE_SINGLE(_f, _s, NULL, vmstate_info_int32_le, int32_t) #define VMSTATE_FLOAT64(_f, _s) \ - VMSTATE_SINGLE_TEST(_f, _s, NULL, 0, vmstate_info_float64, float64) + VMSTATE_SINGLE(_f, _s, NULL, vmstate_info_float64, float64) #define VMSTATE_TIMER_TEST(_f, _s, _test) \ VMSTATE_POINTER_TEST(_f, _s, _test, vmstate_info_timer, QEMUTimer *) diff --git a/target-i386/machine.c b/target-i386/machine.c index 1b8e3c4..8e4a518 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -245,7 +245,7 @@ static const VMStateInfo vmstate_hack_uint64_as_uint32 = { }; #define VMSTATE_HACK_UINT32(_f, _s, _t) \ - VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_hack_uint64_as_uint32, uint64_t) + VMSTATE_SINGLE(_f, _s, _t, vmstate_hack_uint64_as_uint32, uint64_t) #endif static void cpu_pre_save(void *opaque) -- 1.9.0