[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 51/97] vmstate: Rename VMSTATE_SINGLE_TEST to VMSTAT
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 51/97] vmstate: Rename VMSTATE_SINGLE_TEST to VMSTATE_SINGLE |
Date: |
Mon, 7 Apr 2014 05:21:09 +0200 |
And as no user used the version_id, just remove the parameter.
Signed-off-by: Juan Quintela <address@hidden>
---
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
- [Qemu-devel] [PATCH 41/97] vmstate: Test for VMSTATE_UINT16_2DARRAY., (continued)
- [Qemu-devel] [PATCH 41/97] vmstate: Test for VMSTATE_UINT16_2DARRAY., Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 42/97] vmstate: Test for VMSTATE_UINT32_2DARRAY, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 44/97] vmstate: Remove version from VMSTATE_BUFFER_UNSAFE, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 43/97] vmstate: Remove unused VMSTATE_BUFFER_V, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 46/97] vmstate: All ptimers users were at least at version 1 or more, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 45/97] vmstate: Remove unused version fields from ARM, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 47/97] vmstate: remove version from all variants of VMSTATE_STRUCT_POINTER*, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 48/97] vmstate: Port last 3 users of VMSTATE_ARRAY to VMSTATE_ARRAY_TEST, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 49/97] vmstate: Port last user of VMSTATE_SINGLE to VMSTATE_SINGLE_TEST, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 50/97] vmstate: Remove unused VMSTATE_POINTER, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 51/97] vmstate: Rename VMSTATE_SINGLE_TEST to VMSTATE_SINGLE,
Juan Quintela <=
- [Qemu-devel] [PATCH 52/97] vmstate: Move VMSTATE_2DARRAY to use _test, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 53/97] vmstate: Rename VMSTATE_POINTER_TEST without _TEST, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 54/97] vmstate: Rename VMSTATE_ARRAY_TEST to VMSTATE_ARRAY, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 55/97] vmstate: Remove version_id from VMSTATE_VBUFFER, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 56/97] vmstate: Remove version_id fields that were not used, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 57/97] vmstate: Remove version_id from VMSTATE_SUB_ARRAY, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 59/97] vmstate: Remove version_id from VMSTATE_VARRAY_UINT16_UNSAFE, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 58/97] vmstate: Remove version parameter from VMSTATE_VARRAY_INT32, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 60/97] vmstate: VMSTATE_ARRAY_OF_POINTER didn't used the version_id field, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 61/97] vmstate: remove version parameter from VMSTATE_BUFFER_POINTER_UNSAFE, Juan Quintela, 2014/04/06