[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/30] virtio-balloon: QOM realize preparations
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 18/30] virtio-balloon: QOM realize preparations |
Date: |
Mon, 9 Dec 2013 21:48:20 +0100 |
From: Andreas Färber <address@hidden>
Rename qdev -> dev since that's what realize's argument is called by
convention. No need to keep more "qdev" around than necessary.
Avoid duplicate VIRTIO_DEVICE() cast.
Signed-off-by: Andreas Färber <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/virtio/virtio-balloon.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index d7a392d..e6f6b4b 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -339,8 +339,8 @@ static int virtio_balloon_load(QEMUFile *f, void *opaque,
int version_id)
static int virtio_balloon_device_init(VirtIODevice *vdev)
{
- DeviceState *qdev = DEVICE(vdev);
- VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
+ DeviceState *dev = DEVICE(vdev);
+ VirtIOBalloon *s = VIRTIO_BALLOON(dev);
int ret;
virtio_init(vdev, "virtio-balloon", VIRTIO_ID_BALLOON, 8);
@@ -349,7 +349,7 @@ static int virtio_balloon_device_init(VirtIODevice *vdev)
virtio_balloon_stat, s);
if (ret < 0) {
- virtio_cleanup(VIRTIO_DEVICE(s));
+ virtio_cleanup(vdev);
return -1;
}
@@ -357,13 +357,13 @@ static int virtio_balloon_device_init(VirtIODevice *vdev)
s->dvq = virtio_add_queue(vdev, 128, virtio_balloon_handle_output);
s->svq = virtio_add_queue(vdev, 128, virtio_balloon_receive_stats);
- register_savevm(qdev, "virtio-balloon", -1, 1,
+ register_savevm(dev, "virtio-balloon", -1, 1,
virtio_balloon_save, virtio_balloon_load, s);
- object_property_add(OBJECT(qdev), "guest-stats", "guest statistics",
+ object_property_add(OBJECT(dev), "guest-stats", "guest statistics",
balloon_stats_get_all, NULL, NULL, s, NULL);
- object_property_add(OBJECT(qdev), "guest-stats-polling-interval", "int",
+ object_property_add(OBJECT(dev), "guest-stats-polling-interval", "int",
balloon_stats_get_poll_interval,
balloon_stats_set_poll_interval,
NULL, s, NULL);
--
1.8.4.2
- [Qemu-devel] [PULL 08/30] virtio-net: switch exit callback to VirtioDeviceClass, (continued)
- [Qemu-devel] [PULL 08/30] virtio-net: switch exit callback to VirtioDeviceClass, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 09/30] virtio-scsi: switch exit callback to VirtioDeviceClass, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 10/30] virtio-balloon: switch exit callback to VirtioDeviceClass, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 11/30] virtio-rng: switch exit callback to VirtioDeviceClass, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 12/30] virtio-pci: add device_unplugged callback, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 13/30] virtio-blk-dataplane: Improve error reporting, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 14/30] virtio-9p: QOM realize preparations, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 15/30] virtio-blk: QOM realize preparations, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 16/30] virtio-serial: QOM realize preparations, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 17/30] virtio-net: QOM realize preparations, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 18/30] virtio-balloon: QOM realize preparations,
Paolo Bonzini <=
- [Qemu-devel] [PULL 19/30] virtio-rng: QOM realize preparations, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 20/30] virtio-scsi: QOM realize preparations, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 21/30] virtio: Start converting VirtioDevice to QOM realize, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 22/30] virtio-9p: Convert to QOM realize, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 23/30] virtio-blk: Convert to QOM realize, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 24/30] virtio-serial: Convert to QOM realize, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 25/30] virtio-net: Convert to QOM realize, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 26/30] virtio-balloon: Convert to QOM realize, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 27/30] virtio-rng: Convert to QOM realize, Paolo Bonzini, 2013/12/09
- [Qemu-devel] [PULL 28/30] virtio-scsi: Convert to QOM realize, Paolo Bonzini, 2013/12/09