From patchwork Mon Apr 21 14:40:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 341067 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 48F3E1400ED for ; Tue, 22 Apr 2014 13:18:03 +1000 (EST) Received: from localhost ([::1]:49489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcFsv-0004Ha-Vb for incoming@patchwork.ozlabs.org; Mon, 21 Apr 2014 11:11:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcFRC-000598-Rs for qemu-devel@nongnu.org; Mon, 21 Apr 2014 10:43:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WcFR6-0004Ay-MP for qemu-devel@nongnu.org; Mon, 21 Apr 2014 10:43:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcFR6-0004As-ES for qemu-devel@nongnu.org; Mon, 21 Apr 2014 10:43:08 -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 s3LEh7rE005330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 21 Apr 2014 10:43:07 -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 s3LEfi75019220; Mon, 21 Apr 2014 10:43:06 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 21 Apr 2014 16:40:39 +0200 Message-Id: <1398091304-10677-60-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 059/124] vmstate: Rename VMSTATE_ARRAY_TEST to VMSTATE_ARRAY 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 VMSTATE_ARRAY is not being used anymore. Signed-off-by: Juan Quintela --- hw/net/vmxnet3.c | 9 ++++----- include/migration/vmstate.h | 20 ++++++++++---------- target-i386/machine.c | 11 +++++++---- target-ppc/machine.c | 4 ++-- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 1faf58d..88a99ca 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2457,15 +2457,14 @@ static const VMStateDescription vmstate_vmxnet3 = { VMSTATE_UINT64(drv_shmem, VMXNET3State), VMSTATE_UINT64(temp_shared_guest_driver_memory, VMXNET3State), - VMSTATE_ARRAY_TEST(txq_descr, VMXNET3State, + VMSTATE_ARRAY(txq_descr, VMXNET3State, VMXNET3_DEVICE_MAX_TX_QUEUES, NULL, txq_descr_info, Vmxnet3TxqDescr), - VMSTATE_ARRAY_TEST(rxq_descr, VMXNET3State, + VMSTATE_ARRAY(rxq_descr, VMXNET3State, VMXNET3_DEVICE_MAX_RX_QUEUES, NULL, rxq_descr_info, Vmxnet3RxqDescr), - VMSTATE_ARRAY_TEST(interrupt_states, VMXNET3State, - VMXNET3_MAX_INTRS, NULL, int_state_info, - Vmxnet3IntState), + VMSTATE_ARRAY(interrupt_states, VMXNET3State, VMXNET3_MAX_INTRS, + NULL, int_state_info, Vmxnet3IntState), VMSTATE_END_OF_LIST() }, diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index cde875e..e4839a2 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -221,7 +221,7 @@ extern const VMStateInfo vmstate_info_bitmap; .offset = vmstate_offset_2darray(_state, _field, _type, _n1, _n2), \ } -#define VMSTATE_ARRAY_TEST(_field, _state, _num, _test, _info, _type) {\ +#define VMSTATE_ARRAY(_field, _state, _num, _test, _info, _type) {\ .name = (stringify(_field)), \ .field_exists = (_test), \ .num = (_num), \ @@ -564,43 +564,43 @@ extern const VMStateInfo vmstate_info_bitmap; VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_info_timer, QEMUTimer *) #define VMSTATE_BOOL_ARRAY_TEST(_f, _s, _n, _t) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, _t, vmstate_info_bool, bool) + VMSTATE_ARRAY(_f, _s, _n, _t, vmstate_info_bool, bool) #define VMSTATE_BOOL_ARRAY(_f, _s, _n) \ VMSTATE_BOOL_ARRAY_TEST(_f, _s, _n, NULL) #define VMSTATE_UINT8_ARRAY(_f, _s, _n) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, NULL, vmstate_info_uint8, uint8_t) + VMSTATE_ARRAY(_f, _s, _n, NULL, vmstate_info_uint8, uint8_t) #define VMSTATE_UINT16_ARRAY(_f, _s, _n) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, NULL, vmstate_info_uint16, uint16_t) + VMSTATE_ARRAY(_f, _s, _n, NULL, vmstate_info_uint16, uint16_t) #define VMSTATE_UINT32_ARRAY_TEST(_f, _s, _n, _t) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, _t, vmstate_info_uint32, uint32_t) + VMSTATE_ARRAY(_f, _s, _n, _t, vmstate_info_uint32, uint32_t) #define VMSTATE_UINT32_ARRAY(_f, _s, _n) \ VMSTATE_UINT32_ARRAY_TEST(_f, _s, _n, NULL) #define VMSTATE_UINT64_ARRAY_TEST(_f, _s, _n, _t) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, _t, vmstate_info_uint64, uint64_t) + VMSTATE_ARRAY(_f, _s, _n, _t, vmstate_info_uint64, uint64_t) #define VMSTATE_UINT64_ARRAY(_f, _s, _n) \ VMSTATE_UINT64_ARRAY_TEST(_f, _s, _n, NULL) #define VMSTATE_INT16_ARRAY(_f, _s, _n) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, NULL, vmstate_info_int16, int16_t) + VMSTATE_ARRAY(_f, _s, _n, NULL, vmstate_info_int16, int16_t) #define VMSTATE_INT32_ARRAY_TEST(_f, _s, _n, _t) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, _t, vmstate_info_int32, int32_t) + VMSTATE_ARRAY(_f, _s, _n, _t, vmstate_info_int32, int32_t) #define VMSTATE_INT32_ARRAY(_f, _s, _n) \ VMSTATE_INT32_ARRAY_TEST(_f, _s, _n, NULL) #define VMSTATE_INT64_ARRAY(_f, _s, _n) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, NULL, vmstate_info_int64, int64_t) + VMSTATE_ARRAY(_f, _s, _n, NULL, vmstate_info_int64, int64_t) #define VMSTATE_FLOAT64_ARRAY(_f, _s, _n) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, NULL, vmstate_info_float64, float64) + VMSTATE_ARRAY(_f, _s, _n, NULL, vmstate_info_float64, float64) #define VMSTATE_UINT8_2DARRAY(_f, _s, _n1, _n2) \ VMSTATE_2DARRAY(_f, _s, _n1, _n2, NULL, vmstate_info_uint8, uint8_t) diff --git a/target-i386/machine.c b/target-i386/machine.c index 8e4a518..2686390 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -209,10 +209,13 @@ static bool fpregs_is_1_no_mmx(void *opaque, int version_id) return (!guess_mmx && (env->fpregs_format_vmstate == 1)); } -#define VMSTATE_FP_REGS(_field, _state, _n) \ - VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_0, vmstate_fpreg, FPReg), \ - VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_1_mmx, vmstate_fpreg_1_mmx, FPReg), \ - VMSTATE_ARRAY_TEST(_field, _state, _n, fpregs_is_1_no_mmx, vmstate_fpreg_1_no_mmx, FPReg) +#define VMSTATE_FP_REGS(_field, _state, _n) \ + VMSTATE_ARRAY(_field, _state, _n, fpregs_is_0, \ + vmstate_fpreg, FPReg), \ + VMSTATE_ARRAY(_field, _state, _n, fpregs_is_1_mmx, \ + vmstate_fpreg_1_mmx, FPReg), \ + VMSTATE_ARRAY(_field, _state, _n, fpregs_is_1_no_mmx, \ + vmstate_fpreg_1_no_mmx, FPReg) static bool version_is_5(void *opaque, int version_id) { diff --git a/target-ppc/machine.c b/target-ppc/machine.c index 4540fe2..8ec6580 100644 --- a/target-ppc/machine.c +++ b/target-ppc/machine.c @@ -121,7 +121,7 @@ static const VMStateInfo vmstate_info_avr = { }; #define VMSTATE_AVR_ARRAY(_f, _s, _n) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, NULL, vmstate_info_avr, ppc_avr_t) + VMSTATE_ARRAY(_f, _s, _n, NULL, vmstate_info_avr, ppc_avr_t) static void cpu_pre_save(void *opaque) { @@ -288,7 +288,7 @@ static const VMStateInfo vmstate_info_slbe = { }; #define VMSTATE_SLB_ARRAY(_f, _s, _n) \ - VMSTATE_ARRAY_TEST(_f, _s, _n, NULL, vmstate_info_slbe, ppc_slb_t) + VMSTATE_ARRAY(_f, _s, _n, NULL, vmstate_info_slbe, ppc_slb_t) static bool slb_needed(void *opaque) {