From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX09z-0007tO-Jl for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WX09t-0000AE-DQ for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:23:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX09t-0000A8-41 for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:23:41 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s373NeXN027351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 6 Apr 2014 23:23:40 -0400 From: Juan Quintela Date: Mon, 7 Apr 2014 05:21:32 +0200 Message-Id: <1396840915-10384-75-git-send-email-quintela@redhat.com> In-Reply-To: <1396840915-10384-1-git-send-email-quintela@redhat.com> References: <1396840915-10384-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH 74/97] vmstate: Remove version parameter from VMSTATE_STRUCT_TEST List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org As we haven't yet moved everything that uses VMSTATE_STRUCT_TEST we create a temporary VMSTATE_STRUCT_INFO. This would allows us to not having to move fields to VMSTATE_STRUCT_TEST and then remove the version parameter. Signed-off-by: Juan Quintela --- hw/acpi/piix4.c | 2 +- include/migration/vmstate.h | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 252bbf2..091dca3 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -270,7 +270,7 @@ static const VMStateDescription vmstate_acpi = { acpi_pci_hotplug.acpi_pcihp_pci_status[ACPI_PCIHP_BSEL_DEFAULT], PIIX4PMState, vmstate_test_no_use_acpi_pci_hotplug, - 2, vmstate_pci_status, + vmstate_pci_status, struct AcpiPciHpPciStatus), VMSTATE_PCI_HOTPLUG(acpi_pci_hotplug, PIIX4PMState, vmstate_test_use_acpi_pci_hotplug), diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 7bbac50..c6590cb 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -276,7 +276,7 @@ extern const VMStateInfo vmstate_info_bitmap; .offset = offsetof(_state, _field), \ } -#define VMSTATE_STRUCT_TEST(_field, _state, _test, _version, _vmsd, _type) { \ +#define VMSTATE_STRUCT_INFO(_field, _state, _test, _version, _vmsd, _type) { \ .name = (stringify(_field)), \ .version_id = (_version), \ .field_exists = (_test), \ @@ -447,8 +447,11 @@ extern const VMStateInfo vmstate_info_bitmap; _v : version */ +#define VMSTATE_STRUCT_TEST(_field, _state, _test, _vmsd, _type) \ + VMSTATE_STRUCT_INFO(_field, _state, _test, 0, _vmsd, _type) + #define VMSTATE_STRUCT(_field, _state, _version, _vmsd, _type) \ - VMSTATE_STRUCT_TEST(_field, _state, NULL, _version, _vmsd, _type) + VMSTATE_STRUCT_INFO(_field, _state, NULL, _version, _vmsd, _type) #define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) \ VMSTATE_STRUCT_POINTER_TEST(_field, _state, NULL, _vmsd, _type) -- 1.9.0