From 226799cec5fa51681a5b8c24d1bebdd735c14a8c Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Fri, 21 Apr 2017 20:26:57 +0800 Subject: socket: Make errp the last parameter of socket_connect Signed-off-by: Fam Zheng Message-Id: <20170421122710.15373-2-famz@redhat.com> Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- include/qemu/sockets.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 7842f6d..567eef1 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -45,8 +45,8 @@ int unix_listen(const char *path, char *ostr, int olen, Error **errp); int unix_connect(const char *path, Error **errp); SocketAddress *socket_parse(const char *str, Error **errp); -int socket_connect(SocketAddress *addr, Error **errp, - NonBlockingConnectHandler *callback, void *opaque); +int socket_connect(SocketAddress *addr, NonBlockingConnectHandler *callback, + void *opaque, Error **errp); int socket_listen(SocketAddress *addr, Error **errp); void socket_listen_cleanup(int fd, Error **errp); int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp); -- cgit v1.1 From 6dffc1f670c2d49b6b5d06b6a559dcf08c33443b Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Fri, 21 Apr 2017 20:26:58 +0800 Subject: socket: Make errp the last parameter of inet_connect_saddr Signed-off-by: Fam Zheng Message-Id: <20170421122710.15373-3-famz@redhat.com> Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- include/qemu/sockets.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 567eef1..af28532 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -36,8 +36,9 @@ int inet_ai_family_from_address(InetSocketAddress *addr, Error **errp); InetSocketAddress *inet_parse(const char *str, Error **errp); int inet_connect(const char *str, Error **errp); -int inet_connect_saddr(InetSocketAddress *saddr, Error **errp, - NonBlockingConnectHandler *callback, void *opaque); +int inet_connect_saddr(InetSocketAddress *saddr, + NonBlockingConnectHandler *callback, void *opaque, + Error **errp); NetworkAddressFamily inet_netfamily(int family); -- cgit v1.1 From 9217283dc8ce48688ea0556763574c0333faf79c Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Fri, 21 Apr 2017 20:27:01 +0800 Subject: block: Make errp the last parameter of bdrv_img_create Signed-off-by: Fam Zheng Message-Id: <20170421122710.15373-6-famz@redhat.com> Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- include/block/block.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/block/block.h b/include/block/block.h index 5ddc0cf..466de49 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -509,7 +509,7 @@ int bdrv_load_vmstate(BlockDriverState *bs, uint8_t *buf, void bdrv_img_create(const char *filename, const char *fmt, const char *base_filename, const char *base_fmt, char *options, uint64_t img_size, int flags, - Error **errp, bool quiet); + bool quiet, Error **errp); /* Returns the alignment in bytes that is required so that no bounce buffer * is required throughout the stack */ -- cgit v1.1 From 375092332eeaa6e47561ce47fd36144cdaf964d0 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Fri, 21 Apr 2017 20:27:02 +0800 Subject: crypto: Make errp the last parameter of functions Move opaque to 2nd instead of the 2nd to last, so that compilers help check with the conversion. Signed-off-by: Fam Zheng Message-Id: <20170421122710.15373-7-famz@redhat.com> Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake [Commit message typo corrected] Signed-off-by: Markus Armbruster --- include/crypto/block.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/crypto/block.h b/include/crypto/block.h index b6971de..4a053a3 100644 --- a/include/crypto/block.h +++ b/include/crypto/block.h @@ -30,23 +30,23 @@ typedef struct QCryptoBlock QCryptoBlock; * and QCryptoBlockOpenOptions in qapi/crypto.json */ typedef ssize_t (*QCryptoBlockReadFunc)(QCryptoBlock *block, + void *opaque, size_t offset, uint8_t *buf, size_t buflen, - Error **errp, - void *opaque); + Error **errp); typedef ssize_t (*QCryptoBlockInitFunc)(QCryptoBlock *block, + void *opaque, size_t headerlen, - Error **errp, - void *opaque); + Error **errp); typedef ssize_t (*QCryptoBlockWriteFunc)(QCryptoBlock *block, + void *opaque, size_t offset, const uint8_t *buf, size_t buflen, - Error **errp, - void *opaque); + Error **errp); /** * qcrypto_block_has_format: -- cgit v1.1 From 78bbd910bb2ff0d7e46d3744f57bcf1ec094fdcb Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Fri, 21 Apr 2017 20:27:04 +0800 Subject: block: Make errp the last parameter of commit_active_start Signed-off-by: Fam Zheng Message-Id: <20170421122710.15373-9-famz@redhat.com> Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- include/block/block_int.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/block/block_int.h b/include/block/block_int.h index 59400bd..4f8cd29 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -805,16 +805,16 @@ void commit_start(const char *job_id, BlockDriverState *bs, * a node name should be autogenerated. * @cb: Completion function for the job. * @opaque: Opaque pointer value passed to @cb. - * @errp: Error object. * @auto_complete: Auto complete the job. + * @errp: Error object. * */ void commit_active_start(const char *job_id, BlockDriverState *bs, BlockDriverState *base, int creation_flags, int64_t speed, BlockdevOnError on_error, const char *filter_node_name, - BlockCompletionFunc *cb, void *opaque, Error **errp, - bool auto_complete); + BlockCompletionFunc *cb, void *opaque, + bool auto_complete, Error **errp); /* * mirror_start: * @job_id: The id of the newly-created job, or %NULL to use the -- cgit v1.1 From bf46e67ddba3d8ac40603450b672f1f293d7cff3 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Fri, 21 Apr 2017 20:27:07 +0800 Subject: scsi: Make errp the last parameter of virtio_scsi_common_realize Signed-off-by: Fam Zheng Message-Id: <20170421122710.15373-12-famz@redhat.com> Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- include/hw/virtio/virtio-scsi.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') 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); -- cgit v1.1