qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 6/6] virtio-ballon: drop reset handler


From: Roman Kagan
Subject: [Qemu-devel] [PATCH v2 6/6] virtio-ballon: drop reset handler
Date: Fri, 19 Aug 2016 16:39:25 +0300

Since the release of ->stat_vq_elem is now ensured by the vm state
change handler, there's no need in the reset handler doing it.

Signed-off-by: Roman Kagan <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Ladi Prosek <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
---
 hw/virtio/virtio-balloon.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 056ae49..1557650 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -465,16 +465,6 @@ static void virtio_balloon_device_unrealize(DeviceState 
*dev, Error **errp)
     virtio_cleanup(vdev);
 }
 
-static void virtio_balloon_device_reset(VirtIODevice *vdev)
-{
-    VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
-
-    if (s->stats_vq_elem != NULL) {
-        g_free(s->stats_vq_elem);
-        s->stats_vq_elem = NULL;
-    }
-}
-
 static void virtio_balloon_instance_init(Object *obj)
 {
     VirtIOBalloon *s = VIRTIO_BALLOON(obj);
@@ -506,7 +496,6 @@ static void virtio_balloon_class_init(ObjectClass *klass, 
void *data)
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     vdc->realize = virtio_balloon_device_realize;
     vdc->unrealize = virtio_balloon_device_unrealize;
-    vdc->reset = virtio_balloon_device_reset;
     vdc->get_config = virtio_balloon_get_config;
     vdc->set_config = virtio_balloon_set_config;
     vdc->get_features = virtio_balloon_get_features;
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]