@@ -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)
{
@@ -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)
@@ -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 = {
@@ -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 *)
@@ -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)
And as no user used the version_id, just remove the parameter. Signed-off-by: Juan Quintela <quintela@redhat.com> --- 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(-)