[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/55] hw: Avoid use of QOM type name macros in VMSta
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL 01/55] hw: Avoid use of QOM type name macros in VMStateDescriptions |
Date: |
Tue, 23 Jul 2013 01:45:42 +0200 |
From: Peter Maydell <address@hidden>
The name field in a VMStateDescription is part of the migration state
versioning, so changing it will break migration. It's therefore a
bad idea to use a QOM typename macro to initialize it, because in
general we're free to rename QOM types as part of code refactoring
and cleanup. For the handful of devices that were doing this by
mistake, replace the QOM typenames with the corresponding literal
strings.
Signed-off-by: Peter Maydell <address@hidden>
[AF: Use TYPE_PVSCSI for TypeInfo instead]
Signed-off-by: Andreas Färber <address@hidden>
---
hw/i2c/exynos4210_i2c.c | 2 +-
hw/scsi/vmw_pvscsi.c | 4 ++--
hw/timer/imx_epit.c | 2 +-
hw/timer/imx_gpt.c | 2 +-
hw/usb/ccid-card-passthru.c | 2 +-
hw/usb/dev-smartcard-reader.c | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/hw/i2c/exynos4210_i2c.c b/hw/i2c/exynos4210_i2c.c
index 52bffa5..42f5e89 100644
--- a/hw/i2c/exynos4210_i2c.c
+++ b/hw/i2c/exynos4210_i2c.c
@@ -271,7 +271,7 @@ static const MemoryRegionOps exynos4210_i2c_ops = {
};
static const VMStateDescription exynos4210_i2c_vmstate = {
- .name = TYPE_EXYNOS4_I2C,
+ .name = "exynos4210.i2c",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index 97d3aa3..e1074e1 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -1136,7 +1136,7 @@ pvscsi_post_load(void *opaque, int version_id)
}
static const VMStateDescription vmstate_pvscsi = {
- .name = TYPE_PVSCSI,
+ .name = "pvscsi",
.version_id = 0,
.minimum_version_id = 0,
.minimum_version_id_old = 0,
@@ -1201,7 +1201,7 @@ static void pvscsi_class_init(ObjectClass *klass, void
*data)
}
static const TypeInfo pvscsi_info = {
- .name = "pvscsi",
+ .name = TYPE_PVSCSI,
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PVSCSIState),
.class_init = pvscsi_class_init,
diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c
index e24e0c4..117dc7b 100644
--- a/hw/timer/imx_epit.c
+++ b/hw/timer/imx_epit.c
@@ -370,7 +370,7 @@ static const MemoryRegionOps imx_epit_ops = {
};
static const VMStateDescription vmstate_imx_timer_epit = {
- .name = TYPE_IMX_EPIT,
+ .name = "imx.epit",
.version_id = 2,
.minimum_version_id = 2,
.minimum_version_id_old = 2,
diff --git a/hw/timer/imx_gpt.c b/hw/timer/imx_gpt.c
index 97fbebb..87db0e1 100644
--- a/hw/timer/imx_gpt.c
+++ b/hw/timer/imx_gpt.c
@@ -142,7 +142,7 @@ typedef struct {
} IMXGPTState;
static const VMStateDescription vmstate_imx_timer_gpt = {
- .name = TYPE_IMX_GPT,
+ .name = "imx.gpt",
.version_id = 3,
.minimum_version_id = 3,
.minimum_version_id_old = 3,
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index 01c7e6f..5f01ff1 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -364,7 +364,7 @@ static int passthru_exitfn(CCIDCardState *base)
}
static VMStateDescription passthru_vmstate = {
- .name = PASSTHRU_DEV_NAME,
+ .name = "ccid-card-passthru",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 125cc2c..b33eb25 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -1397,7 +1397,7 @@ static VMStateDescription usb_device_vmstate = {
};
static VMStateDescription ccid_vmstate = {
- .name = CCID_DEV_NAME,
+ .name = "usb-ccid",
.version_id = 1,
.minimum_version_id = 1,
.post_load = ccid_post_load,
--
1.8.1.4
- [Qemu-devel] [PULL 00/55] QOM devices patch queue 2013-07-22, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 02/55] net/e1000: QOM Upcast Sweep, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 01/55] hw: Avoid use of QOM type name macros in VMStateDescriptions,
Andreas Färber <=
- [Qemu-devel] [PULL 06/55] net/pcnet-pci: QOM Upcast Sweep, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 04/55] net/rtl8139: QOM Upcast Sweep, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 03/55] net/e1000: QOM parent field cleanup, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 07/55] usb/hcd-xhci: QOM Upcast Sweep, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 05/55] net/rtl8139: QOM parent field cleanup, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 09/55] scsi/lsi53c895a: QOM Upcast Sweep, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 11/55] scsi/megasas: QOM Upcast Sweep, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 12/55] scsi/megasas: QOM parent field cleanup, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 13/55] scsi/esp-pci: QOM Upcast Sweep, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 08/55] usb/hcd-xhci: QOM parent field cleanup, Andreas Färber, 2013/07/22