From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1banP9-00076T-M5 for qemu-devel@nongnu.org; Fri, 19 Aug 2016 13:16:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1banP2-0002vr-Jv for qemu-devel@nongnu.org; Fri, 19 Aug 2016 13:16:26 -0400 Received: from mail-he1eur01on0119.outbound.protection.outlook.com ([104.47.0.119]:61863 helo=EUR01-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1banP2-0002vl-7F for qemu-devel@nongnu.org; Fri, 19 Aug 2016 13:16:20 -0400 From: Roman Kagan Date: Fri, 19 Aug 2016 16:39:25 +0300 Message-ID: <1471613966-7267-7-git-send-email-rkagan@virtuozzo.com> In-Reply-To: <1471613966-7267-1-git-send-email-rkagan@virtuozzo.com> References: <1471613966-7267-1-git-send-email-rkagan@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v2 6/6] virtio-ballon: drop reset handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Denis V. Lunev" , Roman Kagan , "Michael S. Tsirkin" , Ladi Prosek , Stefan Hajnoczi 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 Cc: "Michael S. Tsirkin" Cc: Ladi Prosek Cc: Stefan Hajnoczi --- 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