[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/14] scsi: Make errp the last parameter of virtio_
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH 11/14] scsi: Make errp the last parameter of virtio_scsi_common_realize |
Date: |
Fri, 21 Apr 2017 20:27:07 +0800 |
Signed-off-by: Fam Zheng <address@hidden>
---
hw/scsi/vhost-scsi.c | 6 ++++--
hw/scsi/virtio-scsi.c | 11 +++++++----
include/hw/virtio/virtio-scsi.h | 8 +++++---
3 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index c491ece..f53bc17 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -233,9 +233,11 @@ static void vhost_scsi_realize(DeviceState *dev, Error
**errp)
}
}
- virtio_scsi_common_realize(dev, &err, vhost_dummy_handle_output,
+ virtio_scsi_common_realize(dev,
vhost_dummy_handle_output,
- vhost_dummy_handle_output);
+ vhost_dummy_handle_output,
+ vhost_dummy_handle_output,
+ &err);
if (err != NULL) {
error_propagate(errp, err);
goto close_fd;
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index bd62d08..46a3e3f 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -841,10 +841,11 @@ static struct SCSIBusInfo virtio_scsi_scsi_info = {
.load_request = virtio_scsi_load_request,
};
-void virtio_scsi_common_realize(DeviceState *dev, Error **errp,
+void virtio_scsi_common_realize(DeviceState *dev,
VirtIOHandleOutput ctrl,
VirtIOHandleOutput evt,
- VirtIOHandleOutput cmd)
+ VirtIOHandleOutput cmd,
+ Error **errp)
{
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtIOSCSICommon *s = VIRTIO_SCSI_COMMON(dev);
@@ -878,9 +879,11 @@ static void virtio_scsi_device_realize(DeviceState *dev,
Error **errp)
VirtIOSCSI *s = VIRTIO_SCSI(dev);
Error *err = NULL;
- virtio_scsi_common_realize(dev, &err, virtio_scsi_handle_ctrl,
+ virtio_scsi_common_realize(dev,
+ virtio_scsi_handle_ctrl,
virtio_scsi_handle_event,
- virtio_scsi_handle_cmd);
+ virtio_scsi_handle_cmd,
+ &err);
if (err != NULL) {
error_propagate(errp, err);
return;
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
index 8ae0aca..8c8453c 100644
--- a/include/hw/virtio/virtio-scsi.h
+++ b/include/hw/virtio/virtio-scsi.h
@@ -135,9 +135,11 @@ static inline void virtio_scsi_release(VirtIOSCSI *s)
}
}
-void virtio_scsi_common_realize(DeviceState *dev, Error **errp,
- VirtIOHandleOutput ctrl, VirtIOHandleOutput
evt,
- VirtIOHandleOutput cmd);
+void virtio_scsi_common_realize(DeviceState *dev,
+ VirtIOHandleOutput ctrl,
+ VirtIOHandleOutput evt,
+ VirtIOHandleOutput cmd,
+ Error **errp);
void virtio_scsi_common_unrealize(DeviceState *dev, Error **errp);
bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq);
--
2.9.3
- [Qemu-devel] [PATCH 01/14] socket: Make errp the last parameter of socket_connect, (continued)
- [Qemu-devel] [PATCH 01/14] socket: Make errp the last parameter of socket_connect, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 02/14] socket: Make errp the last parameter of inet_connect_saddr, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 03/14] socket: Make errp the last parameter of unix_connect_saddr, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 04/14] socket: Make errp the last parameter of vsock_connect_saddr, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 05/14] block: Make errp the last parameter of bdrv_img_create, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 06/14] crypto: Make errp the last parameter of functions, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 07/14] mirror: Make errp the last parameter of mirror_start_job, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 08/14] block: Make errp the last parameter of commit_active_start, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 09/14] nfs: Make errp the last parameter of nfs_client_open, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 11/14] scsi: Make errp the last parameter of virtio_scsi_common_realize,
Fam Zheng <=
- [Qemu-devel] [PATCH 10/14] fdc: Make errp the last parameter of fdctrl_connect_drives, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 12/14] migration: Make errp the last parameter of local functions, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 13/14] qga: Make errp the last parameter of qga_vss_fsfreeze, Fam Zheng, 2017/04/21
- [Qemu-devel] [PATCH 14/14] error: Apply error_propagate_null.cocci again, Fam Zheng, 2017/04/21
- Re: [Qemu-devel] [PATCH 00/14] Trivial cleanups around error reporting, Eric Blake, 2017/04/21
- Re: [Qemu-devel] [PATCH 00/14] Trivial cleanups around error reporting, Markus Armbruster, 2017/04/22
- Re: [Qemu-devel] [PATCH 00/14] Trivial cleanups around error reporting, Markus Armbruster, 2017/04/24