summaryrefslogtreecommitdiffstats
path: root/hw/virtio
diff options
context:
space:
mode:
authorPeter Maydell2020-12-15 16:41:06 +0100
committerPeter Maydell2021-01-08 16:13:38 +0100
commit729cc683735309bdcd55604be19292950877ecf5 (patch)
tree1526e51aa0a38f97a5950bc549472aefd58c19c8 /hw/virtio
parentscripts/coccinelle: New script to remove unnecessary timer_del() calls (diff)
downloadqemu-729cc683735309bdcd55604be19292950877ecf5.tar.gz
qemu-729cc683735309bdcd55604be19292950877ecf5.tar.xz
qemu-729cc683735309bdcd55604be19292950877ecf5.zip
Remove superfluous timer_del() calls
This commit is the result of running the timer-del-timer-free.cocci script on the whole source tree. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Corey Minyard <cminyard@mvista.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20201215154107.3255-4-peter.maydell@linaro.org
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/vhost-vsock-common.c1
-rw-r--r--hw/virtio/virtio-balloon.c1
-rw-r--r--hw/virtio/virtio-rng.c1
3 files changed, 0 insertions, 3 deletions
diff --git a/hw/virtio/vhost-vsock-common.c b/hw/virtio/vhost-vsock-common.c
index 5b2ebf3496..4ad6e234ad 100644
--- a/hw/virtio/vhost-vsock-common.c
+++ b/hw/virtio/vhost-vsock-common.c
@@ -151,7 +151,6 @@ static void vhost_vsock_common_post_load_timer_cleanup(VHostVSockCommon *vvc)
return;
}
- timer_del(vvc->post_load_timer);
timer_free(vvc->post_load_timer);
vvc->post_load_timer = NULL;
}
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index e83017c02d..e770955176 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -204,7 +204,6 @@ static bool balloon_stats_enabled(const VirtIOBalloon *s)
static void balloon_stats_destroy_timer(VirtIOBalloon *s)
{
if (balloon_stats_enabled(s)) {
- timer_del(s->stats_timer);
timer_free(s->stats_timer);
s->stats_timer = NULL;
s->stats_poll_interval = 0;
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 2886c0ce2a..76ce937693 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -233,7 +233,6 @@ static void virtio_rng_device_unrealize(DeviceState *dev)
VirtIORNG *vrng = VIRTIO_RNG(dev);
qemu_del_vm_change_state_handler(vrng->vmstate);
- timer_del(vrng->rate_limit_timer);
timer_free(vrng->rate_limit_timer);
virtio_del_queue(vdev, 0);
virtio_cleanup(vdev);