|
|
70114f |
From 83bb87c00e9970a1771ddcad3fd99091f5b2719c Mon Sep 17 00:00:00 2001
|
|
|
70114f |
From: "Michael S. Tsirkin" <mst@redhat.com>
|
|
|
70114f |
Date: Thu, 3 Apr 2014 19:52:21 +0300
|
|
|
70114f |
Subject: [PATCH] vmstate: s/VMSTATE_INT32_LE/VMSTATE_INT32_POSITIVE_LE/
|
|
|
70114f |
|
|
|
70114f |
As the macro verifies the value is positive, rename it
|
|
|
70114f |
to make the function clearer.
|
|
|
70114f |
|
|
|
70114f |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
70114f |
Signed-off-by: Juan Quintela <quintela@redhat.com>
|
|
|
70114f |
(cherry picked from commit 3476436a44c29725efef0cabf5b3ea4e70054d57)
|
|
|
70114f |
---
|
|
|
70114f |
hw/pci/pci.c | 4 ++--
|
|
|
70114f |
include/migration/vmstate.h | 2 +-
|
|
|
70114f |
target-arm/machine.c | 2 +-
|
|
|
70114f |
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
70114f |
|
|
|
70114f |
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
|
|
|
70114f |
index 2a9f08e..517ff2a 100644
|
|
|
70114f |
--- a/hw/pci/pci.c
|
|
|
70114f |
+++ b/hw/pci/pci.c
|
|
|
70114f |
@@ -475,7 +475,7 @@ const VMStateDescription vmstate_pci_device = {
|
|
|
70114f |
.minimum_version_id = 1,
|
|
|
70114f |
.minimum_version_id_old = 1,
|
|
|
70114f |
.fields = (VMStateField []) {
|
|
|
70114f |
- VMSTATE_INT32_LE(version_id, PCIDevice),
|
|
|
70114f |
+ VMSTATE_INT32_POSITIVE_LE(version_id, PCIDevice),
|
|
|
70114f |
VMSTATE_BUFFER_UNSAFE_INFO(config, PCIDevice, 0,
|
|
|
70114f |
vmstate_info_pci_config,
|
|
|
70114f |
PCI_CONFIG_SPACE_SIZE),
|
|
|
70114f |
@@ -492,7 +492,7 @@ const VMStateDescription vmstate_pcie_device = {
|
|
|
70114f |
.minimum_version_id = 1,
|
|
|
70114f |
.minimum_version_id_old = 1,
|
|
|
70114f |
.fields = (VMStateField []) {
|
|
|
70114f |
- VMSTATE_INT32_LE(version_id, PCIDevice),
|
|
|
70114f |
+ VMSTATE_INT32_POSITIVE_LE(version_id, PCIDevice),
|
|
|
70114f |
VMSTATE_BUFFER_UNSAFE_INFO(config, PCIDevice, 0,
|
|
|
70114f |
vmstate_info_pci_config,
|
|
|
70114f |
PCIE_CONFIG_SPACE_SIZE),
|
|
|
70114f |
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
|
|
|
70114f |
index 5b71370..7e45048 100644
|
|
|
70114f |
--- a/include/migration/vmstate.h
|
|
|
70114f |
+++ b/include/migration/vmstate.h
|
|
|
70114f |
@@ -601,7 +601,7 @@ extern const VMStateInfo vmstate_info_bitmap;
|
|
|
70114f |
#define VMSTATE_UINT64_EQUAL(_f, _s) \
|
|
|
70114f |
VMSTATE_UINT64_EQUAL_V(_f, _s, 0)
|
|
|
70114f |
|
|
|
70114f |
-#define VMSTATE_INT32_LE(_f, _s) \
|
|
|
70114f |
+#define VMSTATE_INT32_POSITIVE_LE(_f, _s) \
|
|
|
70114f |
VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_le, int32_t)
|
|
|
70114f |
|
|
|
70114f |
#define VMSTATE_UINT8_TEST(_f, _s, _t) \
|
|
|
70114f |
diff --git a/target-arm/machine.c b/target-arm/machine.c
|
|
|
70114f |
index 7ced87a..5746ffd 100644
|
|
|
70114f |
--- a/target-arm/machine.c
|
|
|
70114f |
+++ b/target-arm/machine.c
|
|
|
70114f |
@@ -246,7 +246,7 @@ const VMStateDescription vmstate_arm_cpu = {
|
|
|
70114f |
/* The length-check must come before the arrays to avoid
|
|
|
70114f |
* incoming data possibly overflowing the array.
|
|
|
70114f |
*/
|
|
|
70114f |
- VMSTATE_INT32_LE(cpreg_vmstate_array_len, ARMCPU),
|
|
|
70114f |
+ VMSTATE_INT32_POSITIVE_LE(cpreg_vmstate_array_len, ARMCPU),
|
|
|
70114f |
VMSTATE_VARRAY_INT32(cpreg_vmstate_indexes, ARMCPU,
|
|
|
70114f |
cpreg_vmstate_array_len,
|
|
|
70114f |
0, vmstate_info_uint64, uint64_t),
|