From patchwork Mon Apr 21 14:40:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 341052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1A6B0140180 for ; Tue, 22 Apr 2014 13:17:16 +1000 (EST) Received: from localhost ([::1]:49487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcFsh-0003t7-Pp for incoming@patchwork.ozlabs.org; Mon, 21 Apr 2014 11:11:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcFRN-0005Tm-7X for qemu-devel@nongnu.org; Mon, 21 Apr 2014 10:43:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcFRG-0004ET-QW for qemu-devel@nongnu.org; Mon, 21 Apr 2014 10:43:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcFRG-0004EJ-Ii for qemu-devel@nongnu.org; Mon, 21 Apr 2014 10:43:18 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3LEhHd0031899 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 21 Apr 2014 10:43:18 -0400 Received: from trasno.mitica (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s3LEfi7D019220; Mon, 21 Apr 2014 10:43:16 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 21 Apr 2014 16:40:47 +0200 Message-Id: <1398091304-10677-68-git-send-email-quintela@redhat.com> In-Reply-To: <1398091304-10677-1-git-send-email-quintela@redhat.com> References: <1398091304-10677-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 067/124] vmstate: Remove version, test and start parameter from VMSTATE_VBUFFER_UINT32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org None of its users use them. Signed-off-by: Juan Quintela --- 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()