qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 067/124] vmstate: Remove version, test and start par


From: Juan Quintela
Subject: [Qemu-devel] [PATCH 067/124] vmstate: Remove version, test and start parameter from VMSTATE_VBUFFER_UINT32
Date: Mon, 21 Apr 2014 16:40:47 +0200

None of its users use them.

Signed-off-by: Juan Quintela <address@hidden>
---
 hw/char/exynos4210_uart.c   | 2 +-
 hw/display/g364fb.c         | 2 +-
 hw/dma/pl330.c              | 8 ++++----
 hw/intc/exynos4210_gic.c    | 2 +-
 hw/net/vmxnet3.c            | 3 +--
 hw/nvram/mac_nvram.c        | 2 +-
 hw/sd/sdhci.c               | 2 +-
 hw/timer/m48t59.c           | 2 +-
 include/migration/vmstate.h | 7 ++-----
 util/fifo8.c                | 2 +-
 10 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
index 7614e58..872bc99 100644
--- a/hw/char/exynos4210_uart.c
+++ b/hw/char/exynos4210_uart.c
@@ -563,7 +563,7 @@ static const VMStateDescription 
vmstate_exynos4210_uart_fifo = {
     .fields = (VMStateField[]) {
         VMSTATE_UINT32(sp, Exynos4210UartFIFO),
         VMSTATE_UINT32(rp, Exynos4210UartFIFO),
-        VMSTATE_VBUFFER_UINT32(data, Exynos4210UartFIFO, 1, NULL, 0, size),
+        VMSTATE_VBUFFER_UINT32(data, Exynos4210UartFIFO, size),
         VMSTATE_END_OF_LIST()
     }
 };
diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c
index 9f6717e..b1a7985 100644
--- a/hw/display/g364fb.c
+++ b/hw/display/g364fb.c
@@ -461,7 +461,7 @@ static const VMStateDescription vmstate_g364fb = {
     .minimum_version_id = 1,
     .post_load = g364fb_post_load,
     .fields = (VMStateField[]) {
-        VMSTATE_VBUFFER_UINT32(vram, G364State, 1, NULL, 0, vram_size),
+        VMSTATE_VBUFFER_UINT32(vram, G364State, vram_size),
         VMSTATE_BUFFER_UNSAFE(color_palette, G364State, 256 * 3),
         VMSTATE_BUFFER_UNSAFE(cursor_palette, G364State, 9),
         VMSTATE_UINT16_ARRAY(cursor, G364State, 512),
diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c
index 6b6eaae..e4f8993 100644
--- a/hw/dma/pl330.c
+++ b/hw/dma/pl330.c
@@ -170,8 +170,8 @@ static const VMStateDescription vmstate_pl330_fifo = {
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {
-        VMSTATE_VBUFFER_UINT32(buf, PL330Fifo, 1, NULL, 0, buf_size),
-        VMSTATE_VBUFFER_UINT32(tag, PL330Fifo, 1, NULL, 0, buf_size),
+        VMSTATE_VBUFFER_UINT32(buf, PL330Fifo, buf_size),
+        VMSTATE_VBUFFER_UINT32(tag, PL330Fifo, buf_size),
         VMSTATE_UINT32(head, PL330Fifo),
         VMSTATE_UINT32(num, PL330Fifo),
         VMSTATE_UINT32(buf_size, PL330Fifo),
@@ -279,8 +279,8 @@ static const VMStateDescription vmstate_pl330 = {
         VMSTATE_STRUCT(manager, PL330State, 0, vmstate_pl330_chan, PL330Chan),
         VMSTATE_STRUCT_VARRAY_UINT32(chan, PL330State, num_chnls, 0,
                                      vmstate_pl330_chan, PL330Chan),
-        VMSTATE_VBUFFER_UINT32(lo_seqn, PL330State, 1, NULL, 0, num_chnls),
-        VMSTATE_VBUFFER_UINT32(hi_seqn, PL330State, 1, NULL, 0, num_chnls),
+        VMSTATE_VBUFFER_UINT32(lo_seqn, PL330State, num_chnls),
+        VMSTATE_VBUFFER_UINT32(hi_seqn, PL330State, num_chnls),
         VMSTATE_STRUCT(fifo, PL330State, 0, vmstate_pl330_fifo, PL330Fifo),
         VMSTATE_STRUCT(read_queue, PL330State, 0, vmstate_pl330_queue,
                        PL330Queue),
diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c
index 0590d5d..4c1f095 100644
--- a/hw/intc/exynos4210_gic.c
+++ b/hw/intc/exynos4210_gic.c
@@ -395,7 +395,7 @@ static const VMStateDescription vmstate_exynos4210_irq_gate 
= {
     .version_id = 2,
     .minimum_version_id = 2,
     .fields = (VMStateField[]) {
-        VMSTATE_VBUFFER_UINT32(level, Exynos4210IRQGateState, 1, NULL, 0, 
n_in),
+        VMSTATE_VBUFFER_UINT32(level, Exynos4210IRQGateState, n_in),
         VMSTATE_END_OF_LIST()
     }
 };
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 88a99ca..d6f419f 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -2225,8 +2225,7 @@ static const VMStateDescription 
vmxstate_vmxnet3_mcast_list = {
     .minimum_version_id = 1,
     .pre_load = vmxnet3_mcast_list_pre_load,
     .fields = (VMStateField[]) {
-        VMSTATE_VBUFFER_UINT32(mcast_list, VMXNET3State, 0, NULL, 0,
-            mcast_list_buff_size),
+        VMSTATE_VBUFFER_UINT32(mcast_list, VMXNET3State, mcast_list_buff_size),
         VMSTATE_END_OF_LIST()
     }
 };
diff --git a/hw/nvram/mac_nvram.c b/hw/nvram/mac_nvram.c
index 170b10b..c4b4a4e 100644
--- a/hw/nvram/mac_nvram.c
+++ b/hw/nvram/mac_nvram.c
@@ -97,7 +97,7 @@ static const VMStateDescription vmstate_macio_nvram = {
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {
-        VMSTATE_VBUFFER_UINT32(data, MacIONVRAMState, 0, NULL, 0, size),
+        VMSTATE_VBUFFER_UINT32(data, MacIONVRAMState, size),
         VMSTATE_END_OF_LIST()
     }
 };
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index e2951e6..d9c67a6 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -1223,7 +1223,7 @@ const VMStateDescription sdhci_vmstate = {
         VMSTATE_UINT16(data_count, SDHCIState),
         VMSTATE_UINT64(admasysaddr, SDHCIState),
         VMSTATE_UINT8(stopped_state, SDHCIState),
-        VMSTATE_VBUFFER_UINT32(fifo_buffer, SDHCIState, 1, NULL, 0, buf_maxsz),
+        VMSTATE_VBUFFER_UINT32(fifo_buffer, SDHCIState, buf_maxsz),
         VMSTATE_TIMER(insert_timer, SDHCIState),
         VMSTATE_TIMER(transfer_timer, SDHCIState),
         VMSTATE_END_OF_LIST()
diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c
index 31509d5..3015a02 100644
--- a/hw/timer/m48t59.c
+++ b/hw/timer/m48t59.c
@@ -598,7 +598,7 @@ static const VMStateDescription vmstate_m48t59 = {
     .fields = (VMStateField[]) {
         VMSTATE_UINT8(lock, M48t59State),
         VMSTATE_UINT16(addr, M48t59State),
-        VMSTATE_VBUFFER_UINT32(buffer, M48t59State, 0, NULL, 0, size),
+        VMSTATE_VBUFFER_UINT32(buffer, M48t59State, size),
         VMSTATE_END_OF_LIST()
     }
 };
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index b3db632..a9a8133 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -415,15 +415,12 @@ extern const VMStateInfo vmstate_info_bitmap;
     .start        = (_start),                                        \
 }

-#define VMSTATE_VBUFFER_UINT32(_field, _state, _version, _test, _start, 
_field_size) { \
+#define VMSTATE_VBUFFER_UINT32(_field, _state, _field_size) { \
     .name         = (stringify(_field)),                             \
-    .version_id   = (_version),                                      \
-    .field_exists = (_test),                                         \
     .size_offset  = vmstate_offset_value(_state, _field_size, uint32_t),\
     .info         = &vmstate_info_buffer,                            \
     .flags        = VMS_VBUFFER|VMS_POINTER,                         \
     .offset       = offsetof(_state, _field),                        \
-    .start        = (_start),                                        \
 }

 #define VMSTATE_BUFFER_UNSAFE_TEST(_field, _state, _test, _info, _size) { \
@@ -620,7 +617,7 @@ extern const VMStateInfo vmstate_info_bitmap;
     VMSTATE_VBUFFER(_f, _s, NULL, 0, _size)

 #define VMSTATE_PARTIAL_VBUFFER_UINT32(_f, _s, _size)                        \
-    VMSTATE_VBUFFER_UINT32(_f, _s, 0, NULL, 0, _size)
+    VMSTATE_VBUFFER_UINT32(_f, _s, _size)

 #define VMSTATE_SUB_VBUFFER(_f, _s, _start, _size)                    \
     VMSTATE_VBUFFER(_f, _s, NULL, _start, _size)
diff --git a/util/fifo8.c b/util/fifo8.c
index 0ea5ad9..2f0facd 100644
--- a/util/fifo8.c
+++ b/util/fifo8.c
@@ -117,7 +117,7 @@ const VMStateDescription vmstate_fifo8 = {
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {
-        VMSTATE_VBUFFER_UINT32(data, Fifo8, 1, NULL, 0, capacity),
+        VMSTATE_VBUFFER_UINT32(data, Fifo8, capacity),
         VMSTATE_UINT32(head, Fifo8),
         VMSTATE_UINT32(num, Fifo8),
         VMSTATE_END_OF_LIST()
-- 
1.9.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]