[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH V8 15/15] virtio : cleanup : init and exit funct
From: |
fred . konrad |
Subject: |
[Qemu-devel] [RFC PATCH V8 15/15] virtio : cleanup : init and exit function. |
Date: |
Wed, 19 Dec 2012 10:53:41 +0100 |
From: KONRAD Frederic <address@hidden>
Clean the init and the exit function. It should be applied when all the device
have been refactored.
Signed-off-by: KONRAD Frederic <address@hidden>
---
hw/virtio.c | 15 ---------------
hw/virtio.h | 4 ----
2 files changed, 19 deletions(-)
diff --git a/hw/virtio.c b/hw/virtio.c
index d124ca0..39cdebe 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -908,12 +908,6 @@ void virtio_common_cleanup(VirtIODevice *vdev)
g_free(vdev->vq);
}
-void virtio_cleanup(VirtIODevice *vdev)
-{
- virtio_common_cleanup(vdev);
- g_free(vdev);
-}
-
static void virtio_vmstate_change(void *opaque, int running, RunState state)
{
VirtIODevice *vdev = opaque;
@@ -963,15 +957,6 @@ void virtio_init(VirtIODevice *vdev, const char *name,
vdev);
}
-VirtIODevice *virtio_common_init(const char *name, uint16_t device_id,
- size_t config_size, size_t struct_size)
-{
- VirtIODevice *vdev;
- vdev = g_malloc0(struct_size);
- virtio_init(vdev, name, device_id, config_size);
- return vdev;
-}
-
hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n)
{
return vdev->vq[n].vring.desc;
diff --git a/hw/virtio.h b/hw/virtio.h
index 82726a3..de46098 100644
--- a/hw/virtio.h
+++ b/hw/virtio.h
@@ -162,8 +162,6 @@ void virtio_save(VirtIODevice *vdev, QEMUFile *f);
int virtio_load(VirtIODevice *vdev, QEMUFile *f);
-void virtio_cleanup(VirtIODevice *vdev);
-
void virtio_notify_config(VirtIODevice *vdev);
void virtio_queue_set_notification(VirtQueue *vq, int enable);
@@ -174,8 +172,6 @@ int virtio_queue_empty(VirtQueue *vq);
/* Host binding interface. */
-VirtIODevice *virtio_common_init(const char *name, uint16_t device_id,
- size_t config_size, size_t struct_size);
uint32_t virtio_config_readb(VirtIODevice *vdev, uint32_t addr);
uint32_t virtio_config_readw(VirtIODevice *vdev, uint32_t addr);
uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr);
--
1.7.11.7
- Re: [Qemu-devel] [RFC PATCH V8 08/15] virtio-blk : Add the virtio-blk device., (continued)
- [Qemu-devel] [RFC PATCH V8 06/15] virtio-s390-bus : Add virtio-s390-bus., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 09/15] virtio-blk-pci : Switch to new API., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 07/15] virtio-s390-device : create a virtio-s390-bus during init., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 10/15] virtio-blk-s390 : Switch to the new API., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 12/15] virtio-blk : cleanup : remove qdev field., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 14/15] virtio : Remove VirtIOBindings., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 15/15] virtio : cleanup : init and exit function.,
fred . konrad <=
- [Qemu-devel] [RFC PATCH V8 11/15] virtio-blk : cleanup : use QOM cast., fred . konrad, 2012/12/19
- [Qemu-devel] [RFC PATCH V8 13/15] virtio : Remove the function pointer., fred . konrad, 2012/12/19