[PATCH v4 00/45] Less clumsy error checking

Markus Armbruster posted 45 patches 3 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200707160613.848843-1-armbru@redhat.com
Test checkpatch failed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Maintainers: Cornelia Huck <cohuck@redhat.com>, Radoslaw Biernacki <radoslaw.biernacki@linaro.org>, Leif Lindholm <leif@nuviainc.com>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, Niek Linnenbank <nieklinnenbank@gmail.com>, Eduardo Habkost <ehabkost@redhat.com>, Ari Sundholm <ari@tuxera.com>, Beniamino Galvani <b.galvani@gmail.com>, Stefan Hajnoczi <stefanha@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Joel Stanley <joel@jms.id.au>, Max Reitz <mreitz@redhat.com>, Stefan Weil <sw@weilnetz.de>, Jason Dillaman <dillaman@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Cédric Le Goater" <clg@kaod.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Halil Pasic <pasic@linux.ibm.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, Peter Lieven <pl@kamp.de>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Igor Mammedov <imammedo@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Matthew Rosato <mjrosato@linux.ibm.com>, "Richard W.M. Jones" <rjones@redhat.com>, Thomas Huth <thuth@redhat.com>, Andrew Baumann <Andrew.Baumann@microsoft.com>, "Denis V. Lunev" <den@openvz.org>, Kevin Wolf <kwolf@redhat.com>, Paul Durrant <paul@xen.org>, Jean-Christophe Dubois <jcd@tribudubois.net>, Xiao Guangrong <xiaoguangrong.eric@gmail.com>, Stefano Stabellini <sstabellini@kernel.org>, Michael Roth <mdroth@linux.vnet.ibm.com>, Fam Zheng <fam@euphon.net>, John Snow <jsnow@redhat.com>, Stefan Berger <stefanb@linux.ibm.com>, Laurent Vivier <lvivier@redhat.com>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Andrey Smirnov <andrew.smirnov@gmail.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eric Auger <eric.auger@redhat.com>, Amit Shah <amit@kernel.org>, Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, "Gonglei (Arei)" <arei.gonglei@huawei.com>, Li Zhijian <lizhijian@cn.fujitsu.com>, Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Antony Pavlov <antonynpavlov@gmail.com>, Peter Chubb <peter.chubb@nicta.com.au>, Alberto Garcia <berto@igalia.com>, Aurelien Jarno <aurelien@aurel32.net>, Zhang Chen <chen.zhang@intel.com>, David Hildenbrand <david@redhat.com>, Liu Yuan <namei.unix@gmail.com>, Subbaraya Sundeep <sundeep.lkml@gmail.com>, Gerd Hoffmann <kraxel@redhat.com>, Jan Kiszka <jan.kiszka@web.de>, Anthony Perard <anthony.perard@citrix.com>, Artyom Tarasenko <atar4qemu@gmail.com>, Jeff Cody <codyprime@gmail.com>, Wen Congyang <wencongyang2@huawei.com>, Richard Henderson <rth@twiddle.net>, Paul Burton <pburton@wavecomp.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Palmer Dabbelt <palmer@dabbelt.com>, "Hervé Poussineau" <hpoussin@reactos.org>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Rob Herring <robh@kernel.org>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, Alex Williamson <alex.williamson@redhat.com>, Jason Wang <jasowang@redhat.com>, Xie Changlong <xiechanglong.d@gmail.com>, Igor Mitsyanko <i.mitsyanko@gmail.com>, Alistair Francis <alistair@alistair23.me>, Andrew Jeffery <andrew@aj.id.au>
docs/devel/qapi-code-gen.txt             | 103 ++++-----
include/hw/audio/pcspk.h                 |   2 +-
include/hw/qdev-properties.h             |   4 +-
include/qapi/clone-visitor.h             |   8 +-
include/qapi/error.h                     | 117 ++++++++--
include/qapi/visitor-impl.h              |  26 +--
include/qapi/visitor.h                   | 102 +++++----
include/qemu/option.h                    |  16 +-
include/qom/object.h                     | 104 +++++----
include/qom/object_interfaces.h          |  12 +-
include/qom/qom-qobject.h                |   9 +-
accel/kvm/kvm-all.c                      |  55 +++--
accel/tcg/tcg-all.c                      |   5 +-
audio/audio_legacy.c                     |  15 +-
backends/cryptodev-vhost-user.c          |   3 +-
backends/cryptodev.c                     |  16 +-
backends/hostmem-file.c                  |  22 +-
backends/hostmem-memfd.c                 |  18 +-
backends/hostmem.c                       |  33 ++-
backends/rng.c                           |   2 +-
backends/tpm/tpm_util.c                  |   5 +-
block.c                                  |  21 +-
block/blkdebug.c                         |   9 +-
block/blklogwrites.c                     |   4 +-
block/blkverify.c                        |   4 +-
block/crypto.c                           |   5 +-
block/curl.c                             |   5 +-
block/file-posix.c                       |  16 +-
block/file-win32.c                       |   8 +-
block/gluster.c                          |  17 +-
block/iscsi.c                            |   4 +-
block/nbd.c                              |  10 +-
block/nfs.c                              |   7 +-
block/parallels.c                        |  29 +--
block/qcow.c                             |  16 +-
block/qcow2.c                            |  21 +-
block/qed.c                              |  10 +-
block/quorum.c                           |  19 +-
block/raw-format.c                       |   5 +-
block/rbd.c                              |   7 +-
block/replication.c                      |  19 +-
block/sheepdog.c                         |  16 +-
block/ssh.c                              |  11 +-
block/throttle-groups.c                  |  31 +--
block/throttle.c                         |   5 +-
block/vdi.c                              |  13 +-
block/vhdx.c                             |  15 +-
block/vmdk.c                             |  13 +-
block/vpc.c                              |  19 +-
block/vvfat.c                            |  10 +-
block/vxhs.c                             |  15 +-
blockdev.c                               |  40 ++--
bootdevice.c                             |  13 +-
chardev/char.c                           |   6 +-
contrib/ivshmem-server/main.c            |   4 +-
crypto/secret.c                          |   2 +-
crypto/secret_keyring.c                  |   2 +-
crypto/tlscredsanon.c                    |   2 +-
crypto/tlscredspsk.c                     |   2 +-
crypto/tlscredsx509.c                    |   2 +-
dump/dump.c                              |   7 +-
hw/acpi/core.c                           |  19 +-
hw/acpi/cpu_hotplug.c                    |   4 +-
hw/acpi/ich9.c                           |   2 +-
hw/acpi/piix4.c                          |   2 +-
hw/arm/allwinner-a10.c                   |  27 +--
hw/arm/armsse.c                          | 208 ++++++------------
hw/arm/armv7m.c                          |  47 ++--
hw/arm/aspeed.c                          |  24 +--
hw/arm/aspeed_ast2600.c                  | 124 ++++-------
hw/arm/aspeed_soc.c                      |  85 +++-----
hw/arm/bcm2835_peripherals.c             |  81 ++-----
hw/arm/bcm2836.c                         |  35 +--
hw/arm/cubieboard.c                      |  14 +-
hw/arm/digic.c                           |  18 +-
hw/arm/digic_boards.c                    |   3 +-
hw/arm/exynos4210.c                      |  13 +-
hw/arm/fsl-imx25.c                       |  58 ++---
hw/arm/fsl-imx31.c                       |  34 +--
hw/arm/fsl-imx6.c                        |  85 +++-----
hw/arm/fsl-imx6ul.c                      |  29 ++-
hw/arm/fsl-imx7.c                        |  31 ++-
hw/arm/highbank.c                        |  12 +-
hw/arm/integratorcp.c                    |   2 +-
hw/arm/mcimx6ul-evk.c                    |   4 +-
hw/arm/microbit.c                        |   4 +-
hw/arm/mps2-tz.c                         |  31 ++-
hw/arm/mps2.c                            |  12 +-
hw/arm/msf2-soc.c                        |  29 +--
hw/arm/musca.c                           |  18 +-
hw/arm/musicpal.c                        |   4 +-
hw/arm/nrf51_soc.c                       |  36 +---
hw/arm/orangepi.c                        |  13 +-
hw/arm/raspi.c                           |   2 +-
hw/arm/realview.c                        |   6 +-
hw/arm/sbsa-ref.c                        |  16 +-
hw/arm/stellaris.c                       |   4 +-
hw/arm/stm32f205_soc.c                   |  37 +---
hw/arm/stm32f405_soc.c                   |  48 ++---
hw/arm/versatilepb.c                     |   4 +-
hw/arm/vexpress.c                        |   8 +-
hw/arm/virt.c                            |  44 ++--
hw/arm/xilinx_zynq.c                     |   6 +-
hw/arm/xlnx-versal-virt.c                |   8 +-
hw/arm/xlnx-versal.c                     |  30 ++-
hw/arm/xlnx-zcu102.c                     |   8 +-
hw/arm/xlnx-zynqmp.c                     | 117 ++++------
hw/block/fdc.c                           |  12 +-
hw/block/xen-block.c                     |  30 +--
hw/char/serial-pci-multi.c               |   5 +-
hw/char/serial-pci.c                     |   5 +-
hw/char/serial.c                         |  10 +-
hw/core/bus.c                            |  12 +-
hw/core/cpu.c                            |   3 +-
hw/core/machine.c                        |   5 +-
hw/core/numa.c                           |  55 ++---
hw/core/platform-bus.c                   |   6 +-
hw/core/qdev-properties-system.c         |  32 +--
hw/core/qdev-properties.c                |  95 +++------
hw/core/qdev.c                           |  16 +-
hw/cpu/a15mpcore.c                       |   5 +-
hw/cpu/a9mpcore.c                        |  21 +-
hw/cpu/arm11mpcore.c                     |  17 +-
hw/cpu/core.c                            |  10 +-
hw/cpu/realview_mpcore.c                 |   9 +-
hw/display/bcm2835_fb.c                  |   8 +-
hw/display/virtio-gpu-base.c             |   5 +-
hw/display/virtio-gpu-pci.c              |  11 +-
hw/display/virtio-vga.c                  |  10 +-
hw/dma/bcm2835_dma.c                     |   9 +-
hw/dma/sparc32_dma.c                     |   6 +-
hw/dma/xilinx_axidma.c                   |   4 +-
hw/gpio/aspeed_gpio.c                    |   5 +-
hw/gpio/bcm2835_gpio.c                   |  15 +-
hw/hyperv/vmbus.c                        |   5 +-
hw/i386/pc.c                             |  48 ++---
hw/i386/pc_piix.c                        |   4 +-
hw/i386/pc_q35.c                         |  28 +--
hw/i386/x86.c                            |   7 +-
hw/ide/qdev.c                            |   7 +-
hw/intc/apic_common.c                    |   5 +-
hw/intc/arm_gic_kvm.c                    |   4 +-
hw/intc/arm_gicv3_its_kvm.c              |   5 +-
hw/intc/arm_gicv3_kvm.c                  |   4 +-
hw/intc/armv7m_nvic.c                    |   9 +-
hw/intc/nios2_iic.c                      |   8 +-
hw/intc/pnv_xive.c                       |  17 +-
hw/intc/realview_gic.c                   |   5 +-
hw/intc/spapr_xive.c                     |  17 +-
hw/intc/xics.c                           |   9 +-
hw/intc/xics_kvm.c                       |   4 +-
hw/intc/xive.c                           |  17 +-
hw/isa/piix4.c                           |   5 +-
hw/m68k/q800.c                           |   4 +-
hw/mem/nvdimm.c                          |  30 +--
hw/mem/pc-dimm.c                         |  18 +-
hw/microblaze/petalogix_ml605_mmu.c      |  24 +--
hw/microblaze/petalogix_s3adsp1800_mmu.c |   2 +-
hw/microblaze/xlnx-zynqmp-pmu.c          |  39 ++--
hw/mips/boston.c                         |   4 +-
hw/mips/cps.c                            |  41 ++--
hw/mips/jazz.c                           |   4 +-
hw/mips/malta.c                          |   4 +-
hw/misc/aspeed_sdmc.c                    |   8 +-
hw/misc/bcm2835_mbox.c                   |   9 +-
hw/misc/bcm2835_property.c               |  17 +-
hw/misc/iotkit-sysctl.c                  |   2 +-
hw/misc/ivshmem.c                        |   4 +-
hw/misc/macio/cuda.c                     |   5 +-
hw/misc/macio/macio.c                    |  35 ++-
hw/misc/macio/pmu.c                      |   5 +-
hw/misc/pca9552.c                        |   5 +-
hw/misc/tmp105.c                         |   5 +-
hw/misc/tmp421.c                         |   5 +-
hw/net/ne2000-isa.c                      |   7 +-
hw/net/virtio-net.c                      |   7 +-
hw/net/xilinx_axienet.c                  |   4 +-
hw/pci-host/pnv_phb3.c                   |  33 ++-
hw/pci-host/pnv_phb4.c                   |   9 +-
hw/pci-host/pnv_phb4_pec.c               |   9 +-
hw/pci-host/prep.c                       |   4 +-
hw/ppc/e500.c                            |   5 +-
hw/ppc/mac_newworld.c                    |  10 +-
hw/ppc/mac_oldworld.c                    |   4 +-
hw/ppc/pnv.c                             | 171 +++++++--------
hw/ppc/pnv_core.c                        |   4 +-
hw/ppc/pnv_psi.c                         |  22 +-
hw/ppc/rs6000_mc.c                       |   9 +-
hw/ppc/spapr.c                           |  77 +++----
hw/ppc/spapr_caps.c                      |  15 +-
hw/ppc/spapr_cpu_core.c                  |  15 +-
hw/ppc/spapr_drc.c                       |  16 +-
hw/ppc/spapr_hcall.c                     |   3 +-
hw/ppc/spapr_irq.c                       |  11 +-
hw/ppc/spapr_pci.c                       |  16 +-
hw/ppc/spapr_pci_nvlink2.c               |   3 +-
hw/riscv/opentitan.c                     |  13 +-
hw/riscv/sifive_e.c                      |  10 +-
hw/riscv/sifive_u.c                      |  11 +-
hw/riscv/spike.c                         |   4 +-
hw/riscv/virt.c                          |   4 +-
hw/rx/rx-gdbsim.c                        |  12 +-
hw/s390x/css.c                           |   5 +-
hw/s390x/event-facility.c                |  13 +-
hw/s390x/ipl.c                           |  27 ++-
hw/s390x/s390-pci-bus.c                  |  14 +-
hw/s390x/s390-skeys.c                    |   2 +-
hw/s390x/s390-stattrib.c                 |   2 +-
hw/s390x/s390-virtio-ccw.c               |  20 +-
hw/s390x/sclp.c                          |  13 +-
hw/s390x/virtio-ccw-crypto.c             |  10 +-
hw/s390x/virtio-ccw-rng.c                |   8 +-
hw/scsi/scsi-bus.c                       |  15 +-
hw/scsi/vhost-scsi.c                     |   4 +-
hw/sd/aspeed_sdhci.c                     |  15 +-
hw/sd/sd.c                               |   3 +-
hw/sd/ssi-sd.c                           |  11 +-
hw/smbios/smbios.c                       |  33 +--
hw/sparc/sun4m.c                         |   2 +-
hw/sparc64/sun4u.c                       |   2 +-
hw/usb/bus.c                             |   7 +-
hw/usb/dev-storage.c                     |   9 +-
hw/usb/hcd-dwc2.c                        |   9 +-
hw/vfio/pci-quirks.c                     |   5 +-
hw/vfio/pci.c                            |  10 +-
hw/virtio/virtio-balloon.c               |  17 +-
hw/virtio/virtio-crypto-pci.c            |   9 +-
hw/virtio/virtio-iommu-pci.c             |   4 +-
hw/virtio/virtio-pmem-pci.c              |   2 +-
hw/virtio/virtio-rng-pci.c               |   8 +-
hw/virtio/virtio-rng.c                   |  11 +-
hw/xen/xen_pt_config_init.c              |   3 +-
iothread.c                               |  18 +-
linux-user/syscall.c                     |   2 +-
monitor/hmp-cmds.c                       |  11 +-
monitor/monitor.c                        |  21 +-
net/colo-compare.c                       |  26 +--
net/dump.c                               |  13 +-
net/filter-buffer.c                      |  13 +-
net/filter.c                             |   2 +-
net/net.c                                |  10 +-
net/tap.c                                |   6 +-
qapi/opts-visitor.c                      |  66 +++---
qapi/qapi-clone-visitor.c                |  69 +++---
qapi/qapi-dealloc-visitor.c              |  27 ++-
qapi/qapi-visit-core.c                   | 197 +++++++++--------
qapi/qobject-input-visitor.c             | 109 ++++++----
qapi/qobject-output-visitor.c            |  27 ++-
qapi/string-input-visitor.c              |  67 +++---
qapi/string-output-visitor.c             |  32 +--
qdev-monitor.c                           |  39 ++--
qemu-img.c                               |  23 +-
qga/commands-posix.c                     |   4 +-
qga/commands-win32.c                     |  22 +-
qom/object.c                             | 244 ++++++++++-----------
qom/object_interfaces.c                  |  30 +--
qom/qom-hmp-cmds.c                       |   2 +-
qom/qom-qmp-cmds.c                       |   2 +-
qom/qom-qobject.c                        |  14 +-
softmmu/vl.c                             |  17 +-
target/arm/cpu64.c                       |  15 +-
target/arm/monitor.c                     |   7 +-
target/i386/cpu.c                        |  98 +++------
target/ppc/compat.c                      |   5 +-
target/ppc/translate_init.inc.c          |   2 +-
target/s390x/cpu_models.c                |  17 +-
target/sparc/cpu.c                       |   5 +-
tpm.c                                    |   5 +-
ui/console.c                             |   4 +-
ui/vnc.c                                 |   2 +-
util/main-loop.c                         |   4 +-
util/qemu-config.c                       |  25 +--
util/qemu-option.c                       | 259 ++++++++++++-----------
scripts/qapi/commands.py                 |  22 +-
scripts/qapi/visit.py                    | 107 ++++------
275 files changed, 2419 insertions(+), 3558 deletions(-)
[PATCH v4 00/45] Less clumsy error checking
Posted by Markus Armbruster 3 years, 9 months ago
When the Error API was created, we adopted the (unwritten) rule to
return void when the function returns no useful value on success,
unlike GError, which recommends to return true on success and false on
error then.

When a function returns a distinct error value, say false, a checked
call that passes the error up looks like

    if (!frobnicate(..., errp)) {
        handle the error...
    }

When it returns void, we need

    Error *err = NULL;

    frobnicate(..., &err);
    if (err) {
        handle the error...
        error_propagate(errp, err);
    }

Not only is this more verbose, it also creates an Error object even
when @errp is null, &error_abort or &error_fatal.

People got tired of the additional boilerplate, and started to ignore
the unwritten rule.  The result is confusion among developers about
the preferred usage.

This series adopts the GError rule (in writing), and updates a
substantial amount of code to honor the rule.  Cuts the number of
error_propagate() calls nearly by half.  The diffstat speaks for
itself.

Also available from my public repository
https://repo.or.cz/qemu/armbru.git on branch error-smooth.

v4:
* Rebased
* PATCH 01: Don't show errp instead of &errp, it's premature; leave
  it to Vladimir's series.  Fix the error_propagate_prepend() pileup
  example.  Update commit message accordingly.  R-bys kept, hope
  that's not too bold.
* PATCH 02: New.
* PATCH 03: Structure the big comment with headlines.  Explain the
  @errp usage restrictions more clearly.  Update examples to
  prefer checking the return value over checking @err.  Update commit
  message accordingly.  R-bys kept, hope that's not too bold.
* PATCH 07: Tweak commit message [Greg]
* Left for later: followup to fix nearby typos and such [Eric]

v3:
* Rebased
* Fix patch ordering: old PATCH 19 becomes PATCH 37
* PATCH 03+13+25+27: Avoid long lines in Coccinelle script [Eric]
* PATCH 14: Fix commit message typo [Eric]
* PATCH 16: Unbreak opts_start_list(), qapi_clone_start_list(),
  qapi_clone_start_alternate() [Vladimir]
* PATCH 24: Unbreak object_set_link_property() [Vladimir]
* PATCH 25+33+35: Move unrelated hunks from 25 to 33 and 35
  [Vladimir], tweak line breaks
* PATCH 32: Have commit message point out the unnecessary
  error_propagate() will be eliminated shortly [Eric]
* PATCH 33: Fix commit message typo [Eric]
* PATCH 35: Delete comment along with the assertion [Eric]
* Left for later: followup to fix nearby typos and such [Eric]

v2:
* Rebased
* Coccinelle scripts reworked, patches sliced and diced for
  reviewability:
  Old PATCH 03+17+23-24+35+38-39+42 split into "Use returned bool to
  check for failure" parts [PATCH 03+13+17-18+25+28-29+42], and
  "Eliminate error_propagate()" parts.  The latter combined with old
  PATCH 06-07+18-19+29+43 are now [PATCH 33-37].  The end result is
  almost identical.  Some R-bys dropped; sorry!
* Drop variables as they become unused [Vladimir]
* PATCH 01: Comment typos fixed [Greg]
* PATCH 09: Simplify further by cutting out variables [Eric]
* PATCH 11: opt_set() renamed to opt_validate(), redundant parameter
  dropped [Vladimir], R-by kept
* PATCH 16: Comment typos fixed, indentation tidied up [Eric]
* PATCH 23: Assertion dropped [Eric], incorrect hunk backed out
* PATCH 26: Regenerated after rebase; note additional Coccinelle
  hiccup in the commit message
* PATCH 27: Indentation tiedied up [Eric]
* Left for later: followup to fix nearby typos and such [Eric]

Markus Armbruster (45):
  error: Fix examples in error.h's big comment
  error: Improve error.h's big comment
  error: Document Error API usage rules
  qdev: Use returned bool to check for qdev_realize() etc. failure
  macio: Tidy up error handling in macio_newworld_realize()
  virtio-crypto-pci: Tidy up virtio_crypto_pci_realize()
  qemu-option: Check return value instead of @err where convenient
  qemu-option: Make uses of find_desc_by_name() more similar
  qemu-option: Factor out helper find_default_by_name()
  qemu-option: Simplify around find_default_by_name()
  qemu-option: Factor out helper opt_create()
  qemu-option: Replace opt_set() by cleaner opt_validate()
  qemu-option: Make functions taking Error ** return bool, not void
  qemu-option: Use returned bool to check for failure
  block: Avoid error accumulation in bdrv_img_create()
  hmp: Eliminate a variable in hmp_migrate_set_parameter()
  qapi: Make visitor functions taking Error ** return bool, not void
  qapi: Use returned bool to check for failure, Coccinelle part
  qapi: Use returned bool to check for failure, manual part
  s390x/pci: Fix harmless mistake in zpci's property fid's setter
  qom: Use error_reportf_err() instead of g_printerr() in examples
  qom: Rename qdev_get_type() to object_get_type()
  qom: Crash more nicely on object_property_get_link() failure
  qom: Don't handle impossible object_property_get_link() failure
  qom: Use return values to check for error where that's simpler
  qom: Put name parameter before value / visitor parameter
  qom: Make functions taking Error ** return bool, not void
  qom: Use returned bool to check for failure, Coccinelle part
  qom: Use returned bool to check for failure, manual part
  qom: Make functions taking Error ** return bool, not 0/-1
  qdev: Make functions taking Error ** return bool, not void
  qdev: Use returned bool to check for failure, Coccinelle part
  error: Avoid unnecessary error_propagate() after error_setg()
  error: Eliminate error_propagate() with Coccinelle, part 1
  error: Eliminate error_propagate() with Coccinelle, part 2
  error: Eliminate error_propagate() manually
  error: Reduce unnecessary error propagation
  block/parallels: Simplify parallels_open() after previous commit
  qapi: Smooth another visitor error checking pattern
  qapi: Smooth visitor error checking in generated code
  qapi: Purge error_propagate() from QAPI core
  error: Avoid error_propagate() after migrate_add_blocker()
  qemu-img: Ignore Error objects where the return value suffices
  qdev: Ignore Error objects where the return value suffices
  hmp: Ignore Error objects where the return value suffices

 docs/devel/qapi-code-gen.txt             | 103 ++++-----
 include/hw/audio/pcspk.h                 |   2 +-
 include/hw/qdev-properties.h             |   4 +-
 include/qapi/clone-visitor.h             |   8 +-
 include/qapi/error.h                     | 117 ++++++++--
 include/qapi/visitor-impl.h              |  26 +--
 include/qapi/visitor.h                   | 102 +++++----
 include/qemu/option.h                    |  16 +-
 include/qom/object.h                     | 104 +++++----
 include/qom/object_interfaces.h          |  12 +-
 include/qom/qom-qobject.h                |   9 +-
 accel/kvm/kvm-all.c                      |  55 +++--
 accel/tcg/tcg-all.c                      |   5 +-
 audio/audio_legacy.c                     |  15 +-
 backends/cryptodev-vhost-user.c          |   3 +-
 backends/cryptodev.c                     |  16 +-
 backends/hostmem-file.c                  |  22 +-
 backends/hostmem-memfd.c                 |  18 +-
 backends/hostmem.c                       |  33 ++-
 backends/rng.c                           |   2 +-
 backends/tpm/tpm_util.c                  |   5 +-
 block.c                                  |  21 +-
 block/blkdebug.c                         |   9 +-
 block/blklogwrites.c                     |   4 +-
 block/blkverify.c                        |   4 +-
 block/crypto.c                           |   5 +-
 block/curl.c                             |   5 +-
 block/file-posix.c                       |  16 +-
 block/file-win32.c                       |   8 +-
 block/gluster.c                          |  17 +-
 block/iscsi.c                            |   4 +-
 block/nbd.c                              |  10 +-
 block/nfs.c                              |   7 +-
 block/parallels.c                        |  29 +--
 block/qcow.c                             |  16 +-
 block/qcow2.c                            |  21 +-
 block/qed.c                              |  10 +-
 block/quorum.c                           |  19 +-
 block/raw-format.c                       |   5 +-
 block/rbd.c                              |   7 +-
 block/replication.c                      |  19 +-
 block/sheepdog.c                         |  16 +-
 block/ssh.c                              |  11 +-
 block/throttle-groups.c                  |  31 +--
 block/throttle.c                         |   5 +-
 block/vdi.c                              |  13 +-
 block/vhdx.c                             |  15 +-
 block/vmdk.c                             |  13 +-
 block/vpc.c                              |  19 +-
 block/vvfat.c                            |  10 +-
 block/vxhs.c                             |  15 +-
 blockdev.c                               |  40 ++--
 bootdevice.c                             |  13 +-
 chardev/char.c                           |   6 +-
 contrib/ivshmem-server/main.c            |   4 +-
 crypto/secret.c                          |   2 +-
 crypto/secret_keyring.c                  |   2 +-
 crypto/tlscredsanon.c                    |   2 +-
 crypto/tlscredspsk.c                     |   2 +-
 crypto/tlscredsx509.c                    |   2 +-
 dump/dump.c                              |   7 +-
 hw/acpi/core.c                           |  19 +-
 hw/acpi/cpu_hotplug.c                    |   4 +-
 hw/acpi/ich9.c                           |   2 +-
 hw/acpi/piix4.c                          |   2 +-
 hw/arm/allwinner-a10.c                   |  27 +--
 hw/arm/armsse.c                          | 208 ++++++------------
 hw/arm/armv7m.c                          |  47 ++--
 hw/arm/aspeed.c                          |  24 +--
 hw/arm/aspeed_ast2600.c                  | 124 ++++-------
 hw/arm/aspeed_soc.c                      |  85 +++-----
 hw/arm/bcm2835_peripherals.c             |  81 ++-----
 hw/arm/bcm2836.c                         |  35 +--
 hw/arm/cubieboard.c                      |  14 +-
 hw/arm/digic.c                           |  18 +-
 hw/arm/digic_boards.c                    |   3 +-
 hw/arm/exynos4210.c                      |  13 +-
 hw/arm/fsl-imx25.c                       |  58 ++---
 hw/arm/fsl-imx31.c                       |  34 +--
 hw/arm/fsl-imx6.c                        |  85 +++-----
 hw/arm/fsl-imx6ul.c                      |  29 ++-
 hw/arm/fsl-imx7.c                        |  31 ++-
 hw/arm/highbank.c                        |  12 +-
 hw/arm/integratorcp.c                    |   2 +-
 hw/arm/mcimx6ul-evk.c                    |   4 +-
 hw/arm/microbit.c                        |   4 +-
 hw/arm/mps2-tz.c                         |  31 ++-
 hw/arm/mps2.c                            |  12 +-
 hw/arm/msf2-soc.c                        |  29 +--
 hw/arm/musca.c                           |  18 +-
 hw/arm/musicpal.c                        |   4 +-
 hw/arm/nrf51_soc.c                       |  36 +---
 hw/arm/orangepi.c                        |  13 +-
 hw/arm/raspi.c                           |   2 +-
 hw/arm/realview.c                        |   6 +-
 hw/arm/sbsa-ref.c                        |  16 +-
 hw/arm/stellaris.c                       |   4 +-
 hw/arm/stm32f205_soc.c                   |  37 +---
 hw/arm/stm32f405_soc.c                   |  48 ++---
 hw/arm/versatilepb.c                     |   4 +-
 hw/arm/vexpress.c                        |   8 +-
 hw/arm/virt.c                            |  44 ++--
 hw/arm/xilinx_zynq.c                     |   6 +-
 hw/arm/xlnx-versal-virt.c                |   8 +-
 hw/arm/xlnx-versal.c                     |  30 ++-
 hw/arm/xlnx-zcu102.c                     |   8 +-
 hw/arm/xlnx-zynqmp.c                     | 117 ++++------
 hw/block/fdc.c                           |  12 +-
 hw/block/xen-block.c                     |  30 +--
 hw/char/serial-pci-multi.c               |   5 +-
 hw/char/serial-pci.c                     |   5 +-
 hw/char/serial.c                         |  10 +-
 hw/core/bus.c                            |  12 +-
 hw/core/cpu.c                            |   3 +-
 hw/core/machine.c                        |   5 +-
 hw/core/numa.c                           |  55 ++---
 hw/core/platform-bus.c                   |   6 +-
 hw/core/qdev-properties-system.c         |  32 +--
 hw/core/qdev-properties.c                |  95 +++------
 hw/core/qdev.c                           |  16 +-
 hw/cpu/a15mpcore.c                       |   5 +-
 hw/cpu/a9mpcore.c                        |  21 +-
 hw/cpu/arm11mpcore.c                     |  17 +-
 hw/cpu/core.c                            |  10 +-
 hw/cpu/realview_mpcore.c                 |   9 +-
 hw/display/bcm2835_fb.c                  |   8 +-
 hw/display/virtio-gpu-base.c             |   5 +-
 hw/display/virtio-gpu-pci.c              |  11 +-
 hw/display/virtio-vga.c                  |  10 +-
 hw/dma/bcm2835_dma.c                     |   9 +-
 hw/dma/sparc32_dma.c                     |   6 +-
 hw/dma/xilinx_axidma.c                   |   4 +-
 hw/gpio/aspeed_gpio.c                    |   5 +-
 hw/gpio/bcm2835_gpio.c                   |  15 +-
 hw/hyperv/vmbus.c                        |   5 +-
 hw/i386/pc.c                             |  48 ++---
 hw/i386/pc_piix.c                        |   4 +-
 hw/i386/pc_q35.c                         |  28 +--
 hw/i386/x86.c                            |   7 +-
 hw/ide/qdev.c                            |   7 +-
 hw/intc/apic_common.c                    |   5 +-
 hw/intc/arm_gic_kvm.c                    |   4 +-
 hw/intc/arm_gicv3_its_kvm.c              |   5 +-
 hw/intc/arm_gicv3_kvm.c                  |   4 +-
 hw/intc/armv7m_nvic.c                    |   9 +-
 hw/intc/nios2_iic.c                      |   8 +-
 hw/intc/pnv_xive.c                       |  17 +-
 hw/intc/realview_gic.c                   |   5 +-
 hw/intc/spapr_xive.c                     |  17 +-
 hw/intc/xics.c                           |   9 +-
 hw/intc/xics_kvm.c                       |   4 +-
 hw/intc/xive.c                           |  17 +-
 hw/isa/piix4.c                           |   5 +-
 hw/m68k/q800.c                           |   4 +-
 hw/mem/nvdimm.c                          |  30 +--
 hw/mem/pc-dimm.c                         |  18 +-
 hw/microblaze/petalogix_ml605_mmu.c      |  24 +--
 hw/microblaze/petalogix_s3adsp1800_mmu.c |   2 +-
 hw/microblaze/xlnx-zynqmp-pmu.c          |  39 ++--
 hw/mips/boston.c                         |   4 +-
 hw/mips/cps.c                            |  41 ++--
 hw/mips/jazz.c                           |   4 +-
 hw/mips/malta.c                          |   4 +-
 hw/misc/aspeed_sdmc.c                    |   8 +-
 hw/misc/bcm2835_mbox.c                   |   9 +-
 hw/misc/bcm2835_property.c               |  17 +-
 hw/misc/iotkit-sysctl.c                  |   2 +-
 hw/misc/ivshmem.c                        |   4 +-
 hw/misc/macio/cuda.c                     |   5 +-
 hw/misc/macio/macio.c                    |  35 ++-
 hw/misc/macio/pmu.c                      |   5 +-
 hw/misc/pca9552.c                        |   5 +-
 hw/misc/tmp105.c                         |   5 +-
 hw/misc/tmp421.c                         |   5 +-
 hw/net/ne2000-isa.c                      |   7 +-
 hw/net/virtio-net.c                      |   7 +-
 hw/net/xilinx_axienet.c                  |   4 +-
 hw/pci-host/pnv_phb3.c                   |  33 ++-
 hw/pci-host/pnv_phb4.c                   |   9 +-
 hw/pci-host/pnv_phb4_pec.c               |   9 +-
 hw/pci-host/prep.c                       |   4 +-
 hw/ppc/e500.c                            |   5 +-
 hw/ppc/mac_newworld.c                    |  10 +-
 hw/ppc/mac_oldworld.c                    |   4 +-
 hw/ppc/pnv.c                             | 171 +++++++--------
 hw/ppc/pnv_core.c                        |   4 +-
 hw/ppc/pnv_psi.c                         |  22 +-
 hw/ppc/rs6000_mc.c                       |   9 +-
 hw/ppc/spapr.c                           |  77 +++----
 hw/ppc/spapr_caps.c                      |  15 +-
 hw/ppc/spapr_cpu_core.c                  |  15 +-
 hw/ppc/spapr_drc.c                       |  16 +-
 hw/ppc/spapr_hcall.c                     |   3 +-
 hw/ppc/spapr_irq.c                       |  11 +-
 hw/ppc/spapr_pci.c                       |  16 +-
 hw/ppc/spapr_pci_nvlink2.c               |   3 +-
 hw/riscv/opentitan.c                     |  13 +-
 hw/riscv/sifive_e.c                      |  10 +-
 hw/riscv/sifive_u.c                      |  11 +-
 hw/riscv/spike.c                         |   4 +-
 hw/riscv/virt.c                          |   4 +-
 hw/rx/rx-gdbsim.c                        |  12 +-
 hw/s390x/css.c                           |   5 +-
 hw/s390x/event-facility.c                |  13 +-
 hw/s390x/ipl.c                           |  27 ++-
 hw/s390x/s390-pci-bus.c                  |  14 +-
 hw/s390x/s390-skeys.c                    |   2 +-
 hw/s390x/s390-stattrib.c                 |   2 +-
 hw/s390x/s390-virtio-ccw.c               |  20 +-
 hw/s390x/sclp.c                          |  13 +-
 hw/s390x/virtio-ccw-crypto.c             |  10 +-
 hw/s390x/virtio-ccw-rng.c                |   8 +-
 hw/scsi/scsi-bus.c                       |  15 +-
 hw/scsi/vhost-scsi.c                     |   4 +-
 hw/sd/aspeed_sdhci.c                     |  15 +-
 hw/sd/sd.c                               |   3 +-
 hw/sd/ssi-sd.c                           |  11 +-
 hw/smbios/smbios.c                       |  33 +--
 hw/sparc/sun4m.c                         |   2 +-
 hw/sparc64/sun4u.c                       |   2 +-
 hw/usb/bus.c                             |   7 +-
 hw/usb/dev-storage.c                     |   9 +-
 hw/usb/hcd-dwc2.c                        |   9 +-
 hw/vfio/pci-quirks.c                     |   5 +-
 hw/vfio/pci.c                            |  10 +-
 hw/virtio/virtio-balloon.c               |  17 +-
 hw/virtio/virtio-crypto-pci.c            |   9 +-
 hw/virtio/virtio-iommu-pci.c             |   4 +-
 hw/virtio/virtio-pmem-pci.c              |   2 +-
 hw/virtio/virtio-rng-pci.c               |   8 +-
 hw/virtio/virtio-rng.c                   |  11 +-
 hw/xen/xen_pt_config_init.c              |   3 +-
 iothread.c                               |  18 +-
 linux-user/syscall.c                     |   2 +-
 monitor/hmp-cmds.c                       |  11 +-
 monitor/monitor.c                        |  21 +-
 net/colo-compare.c                       |  26 +--
 net/dump.c                               |  13 +-
 net/filter-buffer.c                      |  13 +-
 net/filter.c                             |   2 +-
 net/net.c                                |  10 +-
 net/tap.c                                |   6 +-
 qapi/opts-visitor.c                      |  66 +++---
 qapi/qapi-clone-visitor.c                |  69 +++---
 qapi/qapi-dealloc-visitor.c              |  27 ++-
 qapi/qapi-visit-core.c                   | 197 +++++++++--------
 qapi/qobject-input-visitor.c             | 109 ++++++----
 qapi/qobject-output-visitor.c            |  27 ++-
 qapi/string-input-visitor.c              |  67 +++---
 qapi/string-output-visitor.c             |  32 +--
 qdev-monitor.c                           |  39 ++--
 qemu-img.c                               |  23 +-
 qga/commands-posix.c                     |   4 +-
 qga/commands-win32.c                     |  22 +-
 qom/object.c                             | 244 ++++++++++-----------
 qom/object_interfaces.c                  |  30 +--
 qom/qom-hmp-cmds.c                       |   2 +-
 qom/qom-qmp-cmds.c                       |   2 +-
 qom/qom-qobject.c                        |  14 +-
 softmmu/vl.c                             |  17 +-
 target/arm/cpu64.c                       |  15 +-
 target/arm/monitor.c                     |   7 +-
 target/i386/cpu.c                        |  98 +++------
 target/ppc/compat.c                      |   5 +-
 target/ppc/translate_init.inc.c          |   2 +-
 target/s390x/cpu_models.c                |  17 +-
 target/sparc/cpu.c                       |   5 +-
 tpm.c                                    |   5 +-
 ui/console.c                             |   4 +-
 ui/vnc.c                                 |   2 +-
 util/main-loop.c                         |   4 +-
 util/qemu-config.c                       |  25 +--
 util/qemu-option.c                       | 259 ++++++++++++-----------
 scripts/qapi/commands.py                 |  22 +-
 scripts/qapi/visit.py                    | 107 ++++------
 275 files changed, 2419 insertions(+), 3558 deletions(-)

-- 
2.26.2


Re: [PATCH v4 00/45] Less clumsy error checking
Posted by Markus Armbruster 3 years, 9 months ago
Neglected to mention: code changes are limited to resolving rebase
conflicts in PATCH 26.  v4 is about comments, mostly to reduce churn
when combined with Vladimir's auto propagation work.


Re: [PATCH v4 00/45] Less clumsy error checking
Posted by no-reply@patchew.org 3 years, 9 months ago
Patchew URL: https://patchew.org/QEMU/20200707160613.848843-1-armbru@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20200707160613.848843-1-armbru@redhat.com
Subject: [PATCH v4 00/45] Less clumsy error checking

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/159413975752.169116.5808968580649255382.stgit@bahia.lan -> patchew/159413975752.169116.5808968580649255382.stgit@bahia.lan
 * [new tag]         patchew/1594140062-23522-1-git-send-email-aleksandar.qemu.devel@gmail.com -> patchew/1594140062-23522-1-git-send-email-aleksandar.qemu.devel@gmail.com
 * [new tag]         patchew/20200707163504.194740-1-kwolf@redhat.com -> patchew/20200707163504.194740-1-kwolf@redhat.com
Switched to a new branch 'test'
5dad863 hmp: Ignore Error objects where the return value suffices
99fa3f2 qdev: Ignore Error objects where the return value suffices
6ee97c0 qemu-img: Ignore Error objects where the return value suffices
677256f error: Avoid error_propagate() after migrate_add_blocker()
974c52b qapi: Purge error_propagate() from QAPI core
b664ca1 qapi: Smooth visitor error checking in generated code
58529e8 qapi: Smooth another visitor error checking pattern
8761cbd block/parallels: Simplify parallels_open() after previous commit
6821adb error: Reduce unnecessary error propagation
8ed0efc error: Eliminate error_propagate() manually
9f8cd51 error: Eliminate error_propagate() with Coccinelle, part 2
4516a2b error: Eliminate error_propagate() with Coccinelle, part 1
e776a9c error: Avoid unnecessary error_propagate() after error_setg()
97a8ae7 qdev: Use returned bool to check for failure, Coccinelle part
b489fef qdev: Make functions taking Error ** return bool, not void
c5651e9 qom: Make functions taking Error ** return bool, not 0/-1
1e9a1c3 qom: Use returned bool to check for failure, manual part
b158de6 qom: Use returned bool to check for failure, Coccinelle part
911dbb4 qom: Make functions taking Error ** return bool, not void
94c4ad1 qom: Put name parameter before value / visitor parameter
a65eadc qom: Use return values to check for error where that's simpler
aff3f41 qom: Don't handle impossible object_property_get_link() failure
f171d59 qom: Crash more nicely on object_property_get_link() failure
d1d7b14 qom: Rename qdev_get_type() to object_get_type()
54e907c qom: Use error_reportf_err() instead of g_printerr() in examples
aa402c4 s390x/pci: Fix harmless mistake in zpci's property fid's setter
e3a01f0 qapi: Use returned bool to check for failure, manual part
ee2a4a7 qapi: Use returned bool to check for failure, Coccinelle part
d78fd21 qapi: Make visitor functions taking Error ** return bool, not void
45cc0d8 hmp: Eliminate a variable in hmp_migrate_set_parameter()
18fa30f block: Avoid error accumulation in bdrv_img_create()
d5fa417 qemu-option: Use returned bool to check for failure
35a4f99 qemu-option: Make functions taking Error ** return bool, not void
9fcbf0b qemu-option: Replace opt_set() by cleaner opt_validate()
09fdc0e qemu-option: Factor out helper opt_create()
f2370fc qemu-option: Simplify around find_default_by_name()
e8d48f4 qemu-option: Factor out helper find_default_by_name()
d9cd2e4 qemu-option: Make uses of find_desc_by_name() more similar
30d78ea qemu-option: Check return value instead of @err where convenient
c670e7c virtio-crypto-pci: Tidy up virtio_crypto_pci_realize()
22252c6 macio: Tidy up error handling in macio_newworld_realize()
8c1b98a qdev: Use returned bool to check for qdev_realize() etc. failure
99990ce error: Document Error API usage rules
2ae4ce8 error: Improve error.h's big comment
8d27f64 error: Fix examples in error.h's big comment

=== OUTPUT BEGIN ===
1/45 Checking commit 8d27f64734f9 (error: Fix examples in error.h's big comment)
ERROR: Error messages should not contain newlines
#25: FILE: include/qapi/error.h:27:
+ *     error_setg(&err, "invalid quark\n" // WRONG!

total: 1 errors, 0 warnings, 40 lines checked

Patch 1/45 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

2/45 Checking commit 2ae4ce84c712 (error: Improve error.h's big comment)
3/45 Checking commit 99990ce2abc0 (error: Document Error API usage rules)
4/45 Checking commit 8c1b98ac618a (qdev: Use returned bool to check for qdev_realize() etc. failure)
5/45 Checking commit 22252c6387fd (macio: Tidy up error handling in macio_newworld_realize())
6/45 Checking commit c670e7c4698a (virtio-crypto-pci: Tidy up virtio_crypto_pci_realize())
7/45 Checking commit 30d78eae64ac (qemu-option: Check return value instead of @err where convenient)
8/45 Checking commit d9cd2e4dcb0d (qemu-option: Make uses of find_desc_by_name() more similar)
9/45 Checking commit e8d48f4889b3 (qemu-option: Factor out helper find_default_by_name())
10/45 Checking commit f2370fcf82c2 (qemu-option: Simplify around find_default_by_name())
11/45 Checking commit 09fdc0e47ad7 (qemu-option: Factor out helper opt_create())
12/45 Checking commit 9fcbf0ba2199 (qemu-option: Replace opt_set() by cleaner opt_validate())
13/45 Checking commit 35a4f997a6c9 (qemu-option: Make functions taking Error ** return bool, not void)
14/45 Checking commit d5fa417a12e9 (qemu-option: Use returned bool to check for failure)
15/45 Checking commit 18fa30f4db6e (block: Avoid error accumulation in bdrv_img_create())
16/45 Checking commit 45cc0d8cabc8 (hmp: Eliminate a variable in hmp_migrate_set_parameter())
17/45 Checking commit d78fd21439e0 (qapi: Make visitor functions taking Error ** return bool, not void)
WARNING: line over 80 characters
#2455: FILE: scripts/qapi/visit.py:26:
+bool visit_type_%(c_name)s(Visitor *v, const char *name, %(c_type)sobj, Error **errp);

WARNING: line over 80 characters
#2523: FILE: scripts/qapi/visit.py:124:
+bool visit_type_%(c_name)s(Visitor *v, const char *name, %(c_name)s **obj, Error **errp)

WARNING: line over 80 characters
#2552: FILE: scripts/qapi/visit.py:160:
+bool visit_type_%(c_name)s(Visitor *v, const char *name, %(c_name)s *obj, Error **errp)

WARNING: line over 80 characters
#2567: FILE: scripts/qapi/visit.py:174:
+bool visit_type_%(c_name)s(Visitor *v, const char *name, %(c_name)s **obj, Error **errp)

WARNING: line over 80 characters
#2596: FILE: scripts/qapi/visit.py:251:
+bool visit_type_%(c_name)s(Visitor *v, const char *name, %(c_name)s **obj, Error **errp)

total: 0 errors, 5 warnings, 2413 lines checked

Patch 17/45 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
18/45 Checking commit ee2a4a7a4d98 (qapi: Use returned bool to check for failure, Coccinelle part)
19/45 Checking commit e3a01f05013a (qapi: Use returned bool to check for failure, manual part)
WARNING: Block comments use a leading /* on a separate line
#75: FILE: accel/kvm/kvm-all.c:3154:
+        /* The value was checked in visit_type_OnOffSplit() above. If

total: 0 errors, 1 warnings, 187 lines checked

Patch 19/45 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
20/45 Checking commit aa402c440ac8 (s390x/pci: Fix harmless mistake in zpci's property fid's setter)
21/45 Checking commit 54e907c063a7 (qom: Use error_reportf_err() instead of g_printerr() in examples)
22/45 Checking commit d1d7b145ff66 (qom: Rename qdev_get_type() to object_get_type())
23/45 Checking commit f171d5952fa8 (qom: Crash more nicely on object_property_get_link() failure)
24/45 Checking commit aff3f4122615 (qom: Don't handle impossible object_property_get_link() failure)
25/45 Checking commit a65eadce5022 (qom: Use return values to check for error where that's simpler)
26/45 Checking commit 94c4ad1c16a2 (qom: Put name parameter before value / visitor parameter)
27/45 Checking commit 911dbb46c8d7 (qom: Make functions taking Error ** return bool, not void)
28/45 Checking commit b158de666b89 (qom: Use returned bool to check for failure, Coccinelle part)
29/45 Checking commit 1e9a1c3f4045 (qom: Use returned bool to check for failure, manual part)
30/45 Checking commit c5651e94b8f8 (qom: Make functions taking Error ** return bool, not 0/-1)
31/45 Checking commit b489fef95946 (qdev: Make functions taking Error ** return bool, not void)
32/45 Checking commit 97a8ae7c2a72 (qdev: Use returned bool to check for failure, Coccinelle part)
33/45 Checking commit e776a9cabe79 (error: Avoid unnecessary error_propagate() after error_setg())
34/45 Checking commit 4516a2baebc6 (error: Eliminate error_propagate() with Coccinelle, part 1)
35/45 Checking commit 9f8cd5132ce5 (error: Eliminate error_propagate() with Coccinelle, part 2)
36/45 Checking commit 8ed0efc8c01d (error: Eliminate error_propagate() manually)
37/45 Checking commit 6821adb9c5bd (error: Reduce unnecessary error propagation)
38/45 Checking commit 8761cbd491e4 (block/parallels: Simplify parallels_open() after previous commit)
39/45 Checking commit 58529e8bf255 (qapi: Smooth another visitor error checking pattern)
40/45 Checking commit b664ca18d216 (qapi: Smooth visitor error checking in generated code)
41/45 Checking commit 974c52baa88b (qapi: Purge error_propagate() from QAPI core)
42/45 Checking commit 677256f9b938 (error: Avoid error_propagate() after migrate_add_blocker())
43/45 Checking commit 6ee97c0f4cec (qemu-img: Ignore Error objects where the return value suffices)
44/45 Checking commit 99fa3f2a50c1 (qdev: Ignore Error objects where the return value suffices)
45/45 Checking commit 5dad8638ef97 (hmp: Ignore Error objects where the return value suffices)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200707160613.848843-1-armbru@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com