[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] virtio-scsi: remove unused argument to virtio_s
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH] virtio-scsi: remove unused argument to virtio_scsi_common_realize |
Date: |
Thu, 18 Jul 2019 07:06:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 7/17/19 11:47 AM, Paolo Bonzini wrote:
> The argument is not used and passing it clutters error propagation in the
> callers. So, get rid of it.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> hw/scsi/vhost-scsi.c | 2 +-
> hw/scsi/vhost-user-scsi.c | 2 +-
> hw/scsi/virtio-scsi.c | 4 ++--
> include/hw/virtio/virtio-scsi.h | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
> index 4090f99ee4..76bb875ca6 100644
> --- a/hw/scsi/vhost-scsi.c
> +++ b/hw/scsi/vhost-scsi.c
> @@ -262,7 +262,7 @@ static void vhost_scsi_unrealize(DeviceState *dev, Error
> **errp)
> vhost_dev_cleanup(&vsc->dev);
> g_free(vqs);
>
> - virtio_scsi_common_unrealize(dev, errp);
> + virtio_scsi_common_unrealize(dev);
> }
>
> static Property vhost_scsi_properties[] = {
> diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
> index a9fd8ea305..a0b69fbc0f 100644
> --- a/hw/scsi/vhost-user-scsi.c
> +++ b/hw/scsi/vhost-user-scsi.c
> @@ -125,7 +125,7 @@ static void vhost_user_scsi_unrealize(DeviceState *dev,
> Error **errp)
> vhost_dev_cleanup(&vsc->dev);
> g_free(vqs);
>
> - virtio_scsi_common_unrealize(dev, errp);
> + virtio_scsi_common_unrealize(dev);
> vhost_user_cleanup(&s->vhost_user);
> }
>
> diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> index 61ce365fe9..d0bdbff090 100644
> --- a/hw/scsi/virtio-scsi.c
> +++ b/hw/scsi/virtio-scsi.c
> @@ -922,7 +922,7 @@ static void virtio_scsi_device_realize(DeviceState *dev,
> Error **errp)
> virtio_scsi_dataplane_setup(s, errp);
> }
>
> -void virtio_scsi_common_unrealize(DeviceState *dev, Error **errp)
> +void virtio_scsi_common_unrealize(DeviceState *dev)
> {
> VirtIODevice *vdev = VIRTIO_DEVICE(dev);
> VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(dev);
> @@ -936,7 +936,7 @@ static void virtio_scsi_device_unrealize(DeviceState
> *dev, Error **errp)
> VirtIOSCSI *s = VIRTIO_SCSI(dev);
>
> qbus_set_hotplug_handler(BUS(&s->bus), NULL, &error_abort);
> - virtio_scsi_common_unrealize(dev, errp);
> + virtio_scsi_common_unrealize(dev);
> }
>
> static Property virtio_scsi_properties[] = {
> diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
> index 4c0bcdb788..122f7c4b6f 100644
> --- a/include/hw/virtio/virtio-scsi.h
> +++ b/include/hw/virtio/virtio-scsi.h
> @@ -145,7 +145,7 @@ void virtio_scsi_common_realize(DeviceState *dev,
> VirtIOHandleOutput cmd,
> Error **errp);
>
> -void virtio_scsi_common_unrealize(DeviceState *dev, Error **errp);
> +void virtio_scsi_common_unrealize(DeviceState *dev);
> bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq);
> bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq);
> bool virtio_scsi_handle_ctrl_vq(VirtIOSCSI *s, VirtQueue *vq);
>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>