Patchwork [for-next,v2,08/22] virtio-blk: QOM realize preparations

login
register
mail settings
Submitter Andreas Färber
Date Aug. 1, 2013, 2:17 a.m.
Message ID <1375323463-32747-9-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/263868/
State New
Headers show

Comments

Andreas Färber - Aug. 1, 2013, 2:17 a.m.
Rename variable qdev -> dev since that's what realize's argument is called
by convention.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/block/virtio-blk.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 5fb006d..9efc8b7 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -664,8 +664,8 @@  static void virtio_blk_migration_state_changed(Notifier *notifier, void *data)
 
 static int virtio_blk_device_init(VirtIODevice *vdev)
 {
-    DeviceState *qdev = DEVICE(vdev);
-    VirtIOBlock *s = VIRTIO_BLK(vdev);
+    DeviceState *dev = DEVICE(vdev);
+    VirtIOBlock *s = VIRTIO_BLK(dev);
     VirtIOBlkConf *blk = &(s->blk);
 #ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
     Error *err = NULL;
@@ -709,14 +709,14 @@  static int virtio_blk_device_init(VirtIODevice *vdev)
 #endif
 
     s->change = qemu_add_vm_change_state_handler(virtio_blk_dma_restart_cb, s);
-    register_savevm(qdev, "virtio-blk", virtio_blk_id++, 2,
+    register_savevm(dev, "virtio-blk", virtio_blk_id++, 2,
                     virtio_blk_save, virtio_blk_load, s);
     bdrv_set_dev_ops(s->bs, &virtio_block_ops, s);
     bdrv_set_buffer_alignment(s->bs, s->conf->logical_block_size);
 
     bdrv_iostatus_enable(s->bs);
 
-    add_boot_device_path(s->conf->bootindex, qdev, "/disk@0,0");
+    add_boot_device_path(s->conf->bootindex, dev, "/disk@0,0");
     return 0;
 }