diff mbox series

[v2,2/2] virtio-9p-device: convert to new virtio_delete_queue

Message ID 20200117060927.51996-3-pannengyuan@huawei.com
State New
Headers show
Series fix memleaks in virtio_9p_device_unrealize | expand

Commit Message

Pan Nengyuan Jan. 17, 2020, 6:09 a.m. UTC
From: Pan Nengyuan <pannengyuan@huawei.com>

Use virtio_delete_queue to make it more clear.

Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
---
Changes V2 to V1:
- replace virtio_del_queue to virtio_delete_queue to make it more clear.
---
 hw/9pfs/virtio-9p-device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian Schoenebeck Jan. 17, 2020, 1:03 p.m. UTC | #1
On Freitag, 17. Januar 2020 07:09:27 CET pannengyuan@huawei.com wrote:
> From: Pan Nengyuan <pannengyuan@huawei.com>
> 
> Use virtio_delete_queue to make it more clear.
> 
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
> ---
> Changes V2 to V1:
> - replace virtio_del_queue to virtio_delete_queue to make it more clear.
> ---
>  hw/9pfs/virtio-9p-device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
> index 910dc5045e..b146387ae2 100644
> --- a/hw/9pfs/virtio-9p-device.c
> +++ b/hw/9pfs/virtio-9p-device.c
> @@ -215,7 +215,7 @@ static void virtio_9p_device_unrealize(DeviceState *dev,
> Error **errp) V9fsVirtioState *v = VIRTIO_9P(dev);
>      V9fsState *s = &v->state;
> 
> -    virtio_del_queue(vdev, 0);
> +    virtio_delete_queue(v->vq);
>      virtio_cleanup(vdev);
>      v9fs_device_unrealize_common(s, errp);
>  }

No idea what the deprecation plans of virtio_del_queue() are; no behaviour 
change, so this patch is certainly not high priority. On the other hand though 
this change most certainly will be required on day.

I can imagine Greg might want to see a more verbose commit message, but that's 
beyond my personal detail level, so from my side

Acked-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
diff mbox series

Patch

diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index 910dc5045e..b146387ae2 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -215,7 +215,7 @@  static void virtio_9p_device_unrealize(DeviceState *dev, Error **errp)
     V9fsVirtioState *v = VIRTIO_9P(dev);
     V9fsState *s = &v->state;
 
-    virtio_del_queue(vdev, 0);
+    virtio_delete_queue(v->vq);
     virtio_cleanup(vdev);
     v9fs_device_unrealize_common(s, errp);
 }