[Qemu-devel] [PATCH 00/14] Trivial cleanups around error reporting

Fam Zheng posted 14 patches 6 years, 12 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170421122710.15373-1-famz@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
block.c                         |  4 ++--
block/crypto.c                  | 12 ++++++------
block/mirror.c                  | 17 +++++++++--------
block/nfs.c                     |  6 +++---
block/replication.c             |  2 +-
block/sheepdog.c                |  2 +-
block/ssh.c                     |  2 +-
blockdev.c                      | 12 ++++++------
crypto/block-luks.c             | 21 +++++++++------------
hw/block/fdc.c                  |  6 +++---
hw/i386/pc.c                    |  4 +---
hw/s390x/virtio-ccw.c           |  4 +---
hw/scsi/vhost-scsi.c            |  6 ++++--
hw/scsi/virtio-scsi.c           | 11 +++++++----
hw/usb/bus.c                    |  4 +---
include/block/block.h           |  2 +-
include/block/block_int.h       |  6 +++---
include/crypto/block.h          | 12 ++++++------
include/hw/virtio/virtio-scsi.h |  8 +++++---
include/qemu/sockets.h          |  9 +++++----
io/channel-socket.c             |  2 +-
migration/rdma.c                | 12 ++++++------
net/socket.c                    |  2 +-
qemu-img.c                      |  4 ++--
qga/commands-win32.c            |  4 ++--
qga/vss-win32.c                 |  2 +-
qga/vss-win32.h                 |  2 +-
tests/test-crypto-block.c       | 12 ++++++------
tests/test-replication.c        |  8 ++++----
util/qemu-sockets.c             | 38 +++++++++++++++++++++-----------------
30 files changed, 120 insertions(+), 116 deletions(-)
[Qemu-devel] [PATCH 00/14] Trivial cleanups around error reporting
Posted by Fam Zheng 6 years, 12 months ago
These are patches to:

1) reorder the function parameters so that Error **errp comes
last.

Error pointer in the middle of a function parameter list is very uncommon, and
does caused mistakes, thus is not a good style. Change to the usual way.

2) apply the error_propagate_null.cocci semantics patch again.

Fam Zheng (14):
  socket: Make errp the last parameter of socket_connect
  socket: Make errp the last parameter of inet_connect_saddr
  socket: Make errp the last parameter of unix_connect_saddr
  socket: Make errp the last parameter of vsock_connect_saddr
  block: Make errp the last parameter of bdrv_img_create
  crypto: Make errp the last parameter of functions
  mirror: Make errp the last parameter of mirror_start_job
  block: Make errp the last parameter of commit_active_start
  nfs: Make errp the last parameter of nfs_client_open
  fdc: Make errp the last parameter of fdctrl_connect_drives
  scsi: Make errp the last parameter of virtio_scsi_common_realize
  migration: Make errp the last parameter of local functions
  qga: Make errp the last parameter of qga_vss_fsfreeze
  error: Apply error_propagate_null.cocci again

 block.c                         |  4 ++--
 block/crypto.c                  | 12 ++++++------
 block/mirror.c                  | 17 +++++++++--------
 block/nfs.c                     |  6 +++---
 block/replication.c             |  2 +-
 block/sheepdog.c                |  2 +-
 block/ssh.c                     |  2 +-
 blockdev.c                      | 12 ++++++------
 crypto/block-luks.c             | 21 +++++++++------------
 hw/block/fdc.c                  |  6 +++---
 hw/i386/pc.c                    |  4 +---
 hw/s390x/virtio-ccw.c           |  4 +---
 hw/scsi/vhost-scsi.c            |  6 ++++--
 hw/scsi/virtio-scsi.c           | 11 +++++++----
 hw/usb/bus.c                    |  4 +---
 include/block/block.h           |  2 +-
 include/block/block_int.h       |  6 +++---
 include/crypto/block.h          | 12 ++++++------
 include/hw/virtio/virtio-scsi.h |  8 +++++---
 include/qemu/sockets.h          |  9 +++++----
 io/channel-socket.c             |  2 +-
 migration/rdma.c                | 12 ++++++------
 net/socket.c                    |  2 +-
 qemu-img.c                      |  4 ++--
 qga/commands-win32.c            |  4 ++--
 qga/vss-win32.c                 |  2 +-
 qga/vss-win32.h                 |  2 +-
 tests/test-crypto-block.c       | 12 ++++++------
 tests/test-replication.c        |  8 ++++----
 util/qemu-sockets.c             | 38 +++++++++++++++++++++-----------------
 30 files changed, 120 insertions(+), 116 deletions(-)

-- 
2.9.3


Re: [Qemu-devel] [PATCH 00/14] Trivial cleanups around error reporting
Posted by Eric Blake 6 years, 12 months ago
On 04/21/2017 07:26 AM, Fam Zheng wrote:
> These are patches to:
> 
> 1) reorder the function parameters so that Error **errp comes
> last.
> 
> Error pointer in the middle of a function parameter list is very uncommon, and
> does caused mistakes, thus is not a good style. Change to the usual way.
> 
> 2) apply the error_propagate_null.cocci semantics patch again.
> 
> Fam Zheng (14):
>   socket: Make errp the last parameter of socket_connect
>   socket: Make errp the last parameter of inet_connect_saddr
>   socket: Make errp the last parameter of unix_connect_saddr
>   socket: Make errp the last parameter of vsock_connect_saddr
>   block: Make errp the last parameter of bdrv_img_create
>   crypto: Make errp the last parameter of functions
>   mirror: Make errp the last parameter of mirror_start_job
>   block: Make errp the last parameter of commit_active_start
>   nfs: Make errp the last parameter of nfs_client_open
>   fdc: Make errp the last parameter of fdctrl_connect_drives
>   scsi: Make errp the last parameter of virtio_scsi_common_realize
>   migration: Make errp the last parameter of local functions
>   qga: Make errp the last parameter of qga_vss_fsfreeze
>   error: Apply error_propagate_null.cocci again

Series:
Reviewed-by: Eric Blake <eblake@redhat.com>

but you have a typo in the commit message of 6/14

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org