Skip to contentSkip to conversation

Error API: Flag errors in *errp even if errors are being ignored

RFC In review Eduardo Habkost 7 participants 41 messages Jun 13, 2017 – Jul 3, 2017 1 message not in the archive Page 2 of 2

Subsystems (13)
lore
Share & tools
lore
#15 lore raw

RFC 15/15 Use 'Error *err[static 1]' instead of 'Error **errp' to catch NULL errp arguments

In reply to Eduardo Habkost

This is being included in the RFC just to help validating the series, and ensure we don't use NULL errp anywhere.

I don't propose we actually change all code to use the 'Error *errp[static 1]' syntax because it confuses Cocinelle.

I am considering including a assert(errp) line in the ERR_IS_SET() macro, so we can catch NULL errp at runtime in case somebody forgets about it.

Generated by the following Coccinelle patch:

@@
typedef Error;
type T;
identifier FN !~ "os_mem_prealloc|qemu_fork";
identifier errp;
@@
T FN(...,
- Error **errp
+ Error *errp[STATIC_1]

       );

@@
typedef Error;
type T;
identifier FN !~ "os_mem_prealloc|qemu_fork";
identifier errp;
@@
T FN(...,
- Error **errp
+ Error *errp[STATIC_1]

       ) { ... }

Followed by the following sed command:

  $ sed -i -e 's/\[STATIC_1\]/[static 1]/g' $(g grep -w -l STATIC_1)
---
 include/qapi/visitor.h                  |  47 ++++++-----
 block/nbd-client.h                      |   2 +-
 block/qcow2.h                           |   8 +-
 block/vhdx.h                            |   2 +-
 crypto/blockpriv.h                      |   4 +-
 crypto/hmac.h                           |  10 +--
 crypto/tlscredspriv.h                   |   4 +-
 hw/9pfs/9p.h                            |   4 +-
 hw/block/dataplane/virtio-blk.h         |   2 +-
 hw/s390x/s390-virtio.h                  |   2 +-
 hw/timer/m48t59-internal.h              |   2 +-
 hw/usb/hcd-ehci.h                       |   4 +-
 hw/vfio/pci.h                           |   4 +-
 hw/xen/xen-host-pci-device.h            |   2 +-
 hw/xen/xen_pt.h                         |   4 +-
 include/block/aio.h                     |   4 +-
 include/block/block.h                   |  69 +++++++++-------
 include/block/block_backup.h            |   2 +-
 include/block/block_int.h               |  19 +++--
 include/block/blockjob.h                |  11 +--
 include/block/blockjob_int.h            |   3 +-
 include/block/dirty-bitmap.h            |   8 +-
 include/block/nbd.h                     |  13 +--
 include/block/qapi.h                    |   7 +-
 include/block/snapshot.h                |  12 +--
 include/chardev/char-fd.h               |   2 +-
 include/chardev/char-fe.h               |   4 +-
 include/chardev/char-win.h              |   3 +-
 include/chardev/char.h                  |   9 ++-
 include/crypto/afsplit.h                |   4 +-
 include/crypto/block.h                  |  10 +--
 include/crypto/cipher.h                 |   8 +-
 include/crypto/hash.h                   |  12 +--
 include/crypto/init.h                   |   2 +-
 include/crypto/ivgen.h                  |   2 +-
 include/crypto/pbkdf.h                  |   4 +-
 include/crypto/random.h                 |   4 +-
 include/crypto/secret.h                 |   6 +-
 include/crypto/tlssession.h             |   6 +-
 include/exec/memory.h                   |  12 +--
 include/exec/ram_addr.h                 |  12 +--
 include/hw/acpi/acpi.h                  |   4 +-
 include/hw/acpi/cpu.h                   |   7 +-
 include/hw/acpi/cpu_hotplug.h           |   3 +-
 include/hw/acpi/ich9.h                  |   9 ++-
 include/hw/acpi/memory_hotplug.h        |   6 +-
 include/hw/acpi/pcihp.h                 |   4 +-
 include/hw/block/block.h                |   4 +-
 include/hw/boards.h                     |   2 +-
 include/hw/char/serial.h                |   2 +-
 include/hw/hotplug.h                    |   8 +-
 include/hw/i386/pc.h                    |   2 +-
 include/hw/isa/isa.h                    |   2 +-
 include/hw/loader.h                     |   3 +-
 include/hw/mem/pc-dimm.h                |  10 ++-
 include/hw/nmi.h                        |   2 +-
 include/hw/pci/msi.h                    |   2 +-
 include/hw/pci/msix.h                   |   4 +-
 include/hw/pci/pci.h                    |   2 +-
 include/hw/pci/pcie.h                   |   5 +-
 include/hw/pci/pcie_aer.h               |   2 +-
 include/hw/pci/shpc.h                   |   5 +-
 include/hw/ppc/pnv_xscom.h              |   2 +-
 include/hw/ppc/xics.h                   |   7 +-
 include/hw/qdev-core.h                  |   8 +-
 include/hw/qdev-properties.h            |  10 ++-
 include/hw/s390x/css.h                  |   4 +-
 include/hw/scsi/scsi.h                  |   3 +-
 include/hw/smbios/smbios.h              |   2 +-
 include/hw/usb.h                        |   8 +-
 include/hw/vfio/vfio-common.h           |   5 +-
 include/hw/virtio/vhost-scsi-common.h   |   2 +-
 include/hw/virtio/virtio-bus.h          |   2 +-
 include/hw/virtio/virtio-scsi.h         |   6 +-
 include/hw/xen/xen.h                    |   2 +-
 include/io/channel-command.h            |   2 +-
 include/io/channel-file.h               |   2 +-
 include/io/channel-socket.h             |  14 ++--
 include/io/channel-tls.h                |   4 +-
 include/io/channel-util.h               |   2 +-
 include/io/channel.h                    |  20 ++---
 include/io/dns-resolver.h               |   2 +-
 include/io/task.h                       |   2 +-
 include/migration/blocker.h             |   2 +-
 include/migration/failover.h            |   2 +-
 include/migration/migration.h           |   4 +-
 include/migration/snapshot.h            |   4 +-
 include/migration/vmstate.h             |   2 +-
 include/monitor/monitor.h               |   6 +-
 include/monitor/qdev.h                  |   4 +-
 include/net/net.h                       |   6 +-
 include/qapi/error.h                    |   2 +-
 include/qapi/qmp/json-parser.h          |   3 +-
 include/qapi/qmp/qdict.h                |   2 +-
 include/qapi/qmp/qjson.h                |   5 +-
 include/qapi/qobject-input-visitor.h    |   2 +-
 include/qapi/util.h                     |   2 +-
 include/qemu/base64.h                   |   2 +-
 include/qemu/config-file.h              |   4 +-
 include/qemu/log.h                      |   4 +-
 include/qemu/main-loop.h                |   2 +-
 include/qemu/option.h                   |  30 +++----
 include/qemu/sockets.h                  |  33 ++++----
 include/qemu/throttle.h                 |   2 +-
 include/qom/cpu.h                       |   4 +-
 include/qom/object.h                    |  89 ++++++++++----------
 include/qom/object_interfaces.h         |  12 +--
 include/qom/qom-qobject.h               |   4 +-
 include/sysemu/arch_init.h              |   8 +-
 include/sysemu/block-backend.h          |  19 +++--
 include/sysemu/cpus.h                   |   4 +-
 include/sysemu/cryptodev.h              |   8 +-
 include/sysemu/device_tree.h            |   6 +-
 include/sysemu/hostmem.h                |   2 +-
 include/sysemu/memory_mapping.h         |   2 +-
 include/sysemu/numa.h                   |   5 +-
 include/sysemu/qtest.h                  |   3 +-
 include/sysemu/sysemu.h                 |  10 +--
 include/sysemu/tpm_backend.h            |   2 +-
 include/ui/console.h                    |  14 ++--
 include/ui/input.h                      |   2 +-
 include/ui/qemu-spice.h                 |   2 +-
 migration/block.h                       |   2 +-
 migration/exec.h                        |   5 +-
 migration/fd.h                          |   4 +-
 migration/rdma.h                        |   5 +-
 migration/savevm.h                      |   2 +-
 migration/socket.h                      |   9 ++-
 migration/tls.h                         |   4 +-
 nbd/nbd-internal.h                      |   6 +-
 net/clients.h                           |  20 ++---
 net/tap_int.h                           |   5 +-
 qga/guest-agent-core.h                  |   4 +-
 qga/vss-win32.h                         |   2 +-
 replication.h                           |   8 +-
 target/i386/cpu.h                       |   2 +-
 target/ppc/cpu.h                        |   5 +-
 target/s390x/cpu.h                      |   7 +-
 target/s390x/cpu_models.h               |   9 ++-
 qapi/qapi-visit-core.c                  |  58 ++++++++------
 arch_init.c                             |   2 +-
 backends/cryptodev-builtin.c            |  15 ++--
 backends/cryptodev.c                    |  18 ++---
 backends/hostmem-file.c                 |  11 +--
 backends/hostmem-ram.c                  |   2 +-
 backends/hostmem.c                      |  39 +++++----
 backends/rng-egd.c                      |   7 +-
 backends/rng-random.c                   |   6 +-
 backends/rng.c                          |   7 +-
 backends/tpm.c                          |   7 +-
 balloon.c                               |   6 +-
 block.c                                 | 103 +++++++++++++-----------
 block/backup.c                          |   7 +-
 block/blkdebug.c                        |  17 ++--
 block/blkreplay.c                       |   2 +-
 block/blkverify.c                       |   4 +-
 block/block-backend.c                   |  22 ++---
 block/bochs.c                           |   4 +-
 block/cloop.c                           |   4 +-
 block/commit.c                          |   5 +-
 block/crypto.c                          |  20 ++---
 block/curl.c                            |   4 +-
 block/dirty-bitmap.c                    |   9 ++-
 block/dmg.c                             |   6 +-
 block/file-posix.c                      |  42 +++++-----
 block/file-win32.c                      |  18 +++--
 block/gluster.c                         |  15 ++--
 block/io.c                              |   2 +-
 block/iscsi.c                           |  26 +++---
 block/mirror.c                          |  12 +--
 block/nbd-client.c                      |   2 +-
 block/nbd.c                             |  18 +++--
 block/nfs.c                             |  25 +++---
 block/null.c                            |   4 +-
 block/parallels.c                       |   5 +-
 block/qapi.c                            |  13 +--
 block/qcow.c                            |   9 ++-
 block/qcow2-cluster.c                   |   2 +-
 block/qcow2-refcount.c                  |   8 +-
 block/qcow2-snapshot.c                  |   4 +-
 block/qcow2.c                           |  29 ++++---
 block/qed.c                             |  21 +++--
 block/quorum.c                          |   9 ++-
 block/raw-format.c                      |  14 ++--
 block/rbd.c                             |  23 +++---
 block/replication.c                     |  26 +++---
 block/sheepdog.c                        |  33 ++++----
 block/snapshot.c                        |  12 +--
 block/ssh.c                             |  31 ++++---
 block/stream.c                          |   6 +-
 block/vdi.c                             |   7 +-
 block/vhdx-log.c                        |   2 +-
 block/vhdx.c                            |  11 +--
 block/vmdk.c                            |  33 ++++----
 block/vpc.c                             |  11 +--
 block/vvfat.c                           |  12 +--
 block/vxhs.c                            |   6 +-
 block/write-threshold.c                 |   2 +-
 blockdev-nbd.c                          |  11 +--
 blockdev.c                              | 129 +++++++++++++++--------------
 blockjob.c                              |  18 +++--
 bootdevice.c                            |  12 +--
 chardev/baum.c                          |   2 +-
 chardev/char-console.c                  |   2 +-
 chardev/char-fd.c                       |   2 +-
 chardev/char-fe.c                       |   4 +-
 chardev/char-file.c                     |   4 +-
 chardev/char-mux.c                      |   4 +-
 chardev/char-null.c                     |   2 +-
 chardev/char-parallel.c                 |   8 +-
 chardev/char-pipe.c                     |   8 +-
 chardev/char-pty.c                      |   2 +-
 chardev/char-ringbuf.c                  |   8 +-
 chardev/char-serial.c                   |   6 +-
 chardev/char-socket.c                   |  10 +--
 chardev/char-stdio.c                    |   4 +-
 chardev/char-udp.c                      |   4 +-
 chardev/char-win-stdio.c                |   2 +-
 chardev/char-win.c                      |   3 +-
 chardev/char.c                          |  19 ++---
 chardev/msmouse.c                       |   2 +-
 chardev/spice.c                         |   8 +-
 chardev/wctablet.c                      |   2 +-
 cpus.c                                  |  12 +--
 crypto/afsplit.c                        |   6 +-
 crypto/block-luks.c                     |  22 ++---
 crypto/block-qcow.c                     |  10 +--
 crypto/block.c                          |  14 ++--
 crypto/cipher-builtin.c                 |  24 +++---
 crypto/cipher-gcrypt.c                  |   8 +-
 crypto/cipher-nettle.c                  |   8 +-
 crypto/cipher.c                         |   2 +-
 crypto/hash-gcrypt.c                    |   2 +-
 crypto/hash-glib.c                      |   2 +-
 crypto/hash-nettle.c                    |   2 +-
 crypto/hash.c                           |  10 +--
 crypto/hmac-gcrypt.c                    |   4 +-
 crypto/hmac-glib.c                      |   8 +-
 crypto/hmac-nettle.c                    |   4 +-
 crypto/hmac.c                           |   6 +-
 crypto/init.c                           |   2 +-
 crypto/ivgen-essiv.c                    |   4 +-
 crypto/ivgen-plain.c                    |   4 +-
 crypto/ivgen-plain64.c                  |   4 +-
 crypto/ivgen.c                          |   4 +-
 crypto/pbkdf-gcrypt.c                   |   2 +-
 crypto/pbkdf-nettle.c                   |   2 +-
 crypto/pbkdf-stub.c                     |   2 +-
 crypto/pbkdf.c                          |   4 +-
 crypto/random-gcrypt.c                  |   4 +-
 crypto/random-gnutls.c                  |   4 +-
 crypto/random-platform.c                |   4 +-
 crypto/secret.c                         |  38 ++++-----
 crypto/tlscreds.c                       |  20 ++---
 crypto/tlscredsanon.c                   |  12 +--
 crypto/tlscredsx509.c                   |  38 ++++-----
 crypto/tlssession.c                     |  18 ++---
 device_tree.c                           |   8 +-
 dump.c                                  |  52 ++++++------
 exec.c                                  |  20 ++---
 fsdev/qemu-fsdev-throttle.c             |   3 +-
 gdbstub.c                               |   2 +-
 hw/9pfs/9p.c                            |   4 +-
 hw/9pfs/virtio-9p-device.c              |   7 +-
 hw/acpi/acpi-stub.c                     |   2 +-
 hw/acpi/core.c                          |   6 +-
 hw/acpi/cpu.c                           |   7 +-
 hw/acpi/cpu_hotplug.c                   |   5 +-
 hw/acpi/ich9.c                          |  37 +++++----
 hw/acpi/memory_hotplug.c                |   8 +-
 hw/acpi/pcihp.c                         |   4 +-
 hw/acpi/piix4.c                         |  14 ++--
 hw/acpi/vmgenid.c                       |   7 +-
 hw/arm/allwinner-a10.c                  |   2 +-
 hw/arm/armv7m.c                         |   4 +-
 hw/arm/aspeed.c                         |   4 +-
 hw/arm/aspeed_soc.c                     |   2 +-
 hw/arm/bcm2835_peripherals.c            |   3 +-
 hw/arm/bcm2836.c                        |   2 +-
 hw/arm/digic.c                          |   2 +-
 hw/arm/fsl-imx25.c                      |   2 +-
 hw/arm/fsl-imx31.c                      |   2 +-
 hw/arm/fsl-imx6.c                       |   2 +-
 hw/arm/integratorcp.c                   |   2 +-
 hw/arm/musicpal.c                       |   4 +-
 hw/arm/pxa2xx.c                         |   2 +-
 hw/arm/pxa2xx_gpio.c                    |   2 +-
 hw/arm/spitz.c                          |   4 +-
 hw/arm/stm32f205_soc.c                  |   2 +-
 hw/arm/strongarm.c                      |   2 +-
 hw/arm/tosa.c                           |   2 +-
 hw/arm/vexpress.c                       |   5 +-
 hw/arm/virt.c                           |  21 ++---
 hw/arm/xlnx-zynqmp.c                    |   4 +-
 hw/arm/z2.c                             |   2 +-
 hw/audio/ac97.c                         |   2 +-
 hw/audio/adlib.c                        |   2 +-
 hw/audio/cs4231a.c                      |   2 +-
 hw/audio/es1370.c                       |   2 +-
 hw/audio/gus.c                          |   2 +-
 hw/audio/intel-hda.c                    |   6 +-
 hw/audio/marvell_88w8618.c              |   2 +-
 hw/audio/milkymist-ac97.c               |   2 +-
 hw/audio/pcspk.c                        |   2 +-
 hw/audio/pl041.c                        |   2 +-
 hw/audio/sb16.c                         |   2 +-
 hw/block/block.c                        |   4 +-
 hw/block/dataplane/virtio-blk.c         |   2 +-
 hw/block/fdc.c                          |  10 +--
 hw/block/m25p80.c                       |   2 +-
 hw/block/nand.c                         |   2 +-
 hw/block/pflash_cfi01.c                 |   2 +-
 hw/block/pflash_cfi02.c                 |   2 +-
 hw/block/virtio-blk.c                   |   7 +-
 hw/bt/hci-csr.c                         |   2 +-
 hw/char/bcm2835_aux.c                   |   2 +-
 hw/char/cadence_uart.c                  |   2 +-
 hw/char/debugcon.c                      |   4 +-
 hw/char/digic-uart.c                    |   2 +-
 hw/char/escc.c                          |   2 +-
 hw/char/etraxfs_ser.c                   |   2 +-
 hw/char/exynos4210_uart.c               |   2 +-
 hw/char/imx_serial.c                    |   2 +-
 hw/char/ipoctal232.c                    |   2 +-
 hw/char/lm32_juart.c                    |   2 +-
 hw/char/lm32_uart.c                     |   2 +-
 hw/char/mcf_uart.c                      |   2 +-
 hw/char/milkymist-uart.c                |   2 +-
 hw/char/parallel.c                      |   2 +-
 hw/char/pl011.c                         |   2 +-
 hw/char/serial-isa.c                    |   2 +-
 hw/char/serial-pci.c                    |   4 +-
 hw/char/serial.c                        |   2 +-
 hw/char/spapr_vty.c                     |   2 +-
 hw/char/stm32f2xx_usart.c               |   2 +-
 hw/char/terminal3270.c                  |   2 +-
 hw/char/virtio-console.c                |   4 +-
 hw/char/virtio-serial-bus.c             |  16 ++--
 hw/char/xilinx_uartlite.c               |   2 +-
 hw/core/bus.c                           |  11 +--
 hw/core/generic-loader.c                |   4 +-
 hw/core/hotplug.c                       |   8 +-
 hw/core/loader.c                        |   3 +-
 hw/core/machine.c                       |  87 +++++++++++---------
 hw/core/nmi.c                           |   2 +-
 hw/core/or-irq.c                        |   2 +-
 hw/core/platform-bus.c                  |   2 +-
 hw/core/qdev-properties-system.c        |  24 +++---
 hw/core/qdev-properties.c               |  63 ++++++++-------
 hw/core/qdev.c                          |  23 +++---
 hw/cpu/a15mpcore.c                      |   2 +-
 hw/cpu/a9mpcore.c                       |   2 +-
 hw/cpu/arm11mpcore.c                    |   2 +-
 hw/cpu/core.c                           |   8 +-
 hw/cpu/realview_mpcore.c                |   2 +-
 hw/display/ads7846.c                    |   2 +-
 hw/display/bcm2835_fb.c                 |   2 +-
 hw/display/cg3.c                        |   2 +-
 hw/display/cirrus_vga.c                 |   4 +-
 hw/display/exynos4210_fimd.c            |   2 +-
 hw/display/jazz_led.c                   |   2 +-
 hw/display/milkymist-tmu2.c             |   2 +-
 hw/display/milkymist-vgafb.c            |   2 +-
 hw/display/pl110.c                      |   2 +-
 hw/display/qxl.c                        |   6 +-
 hw/display/sm501.c                      |   4 +-
 hw/display/ssd0323.c                    |   2 +-
 hw/display/tcx.c                        |   2 +-
 hw/display/vga-isa.c                    |   2 +-
 hw/display/vga-pci.c                    |   9 ++-
 hw/display/virtio-gpu-pci.c             |   3 +-
 hw/display/virtio-gpu.c                 |   8 +-
 hw/display/virtio-vga.c                 |   3 +-
 hw/display/vmware_vga.c                 |   2 +-
 hw/display/xlnx_dp.c                    |   4 +-
 hw/dma/bcm2835_dma.c                    |   2 +-
 hw/dma/i82374.c                         |   2 +-
 hw/dma/i8257.c                          |   2 +-
 hw/dma/pl330.c                          |   2 +-
 hw/dma/pxa2xx_dma.c                     |   2 +-
 hw/dma/rc4030.c                         |   4 +-
 hw/dma/sparc32_dma.c                    |   2 +-
 hw/dma/xilinx_axidma.c                  |   2 +-
 hw/gpio/bcm2835_gpio.c                  |   2 +-
 hw/gpio/gpio_key.c                      |   2 +-
 hw/gpio/imx_gpio.c                      |   2 +-
 hw/gpio/omap_gpio.c                     |   4 +-
 hw/i2c/aspeed_i2c.c                     |   2 +-
 hw/i2c/imx_i2c.c                        |   2 +-
 hw/i2c/omap_i2c.c                       |   2 +-
 hw/i2c/smbus_ich9.c                     |   2 +-
 hw/i386/amd_iommu.c                     |   2 +-
 hw/i386/intel_iommu.c                   |   4 +-
 hw/i386/kvm/apic.c                      |   4 +-
 hw/i386/kvm/clock.c                     |   2 +-
 hw/i386/kvm/i8254.c                     |   2 +-
 hw/i386/kvm/i8259.c                     |   2 +-
 hw/i386/kvm/ioapic.c                    |   2 +-
 hw/i386/kvm/pci-assign.c                |  21 ++---
 hw/i386/kvmvapic.c                      |   2 +-
 hw/i386/pc.c                            |  73 +++++++++--------
 hw/i386/x86-iommu.c                     |   2 +-
 hw/i386/xen/xen-hvm.c                   |   4 +-
 hw/i386/xen/xen_apic.c                  |   2 +-
 hw/i386/xen/xen_platform.c              |   2 +-
 hw/i386/xen/xen_pvdevice.c              |   2 +-
 hw/ide/ahci.c                           |   2 +-
 hw/ide/cmd646.c                         |   2 +-
 hw/ide/core.c                           |   2 +-
 hw/ide/ich.c                            |   2 +-
 hw/ide/isa.c                            |   2 +-
 hw/ide/macio.c                          |   2 +-
 hw/ide/microdrive.c                     |   2 +-
 hw/ide/mmio.c                           |   2 +-
 hw/ide/piix.c                           |   2 +-
 hw/ide/qdev.c                           |   8 +-
 hw/ide/via.c                            |   2 +-
 hw/input/adb.c                          |   6 +-
 hw/input/pckbd.c                        |   2 +-
 hw/input/virtio-input-hid.c             |   5 +-
 hw/input/virtio-input-host.c            |   5 +-
 hw/input/virtio-input.c                 |   8 +-
 hw/input/vmmouse.c                      |   2 +-
 hw/intc/apic.c                          |   4 +-
 hw/intc/apic_common.c                   |   8 +-
 hw/intc/arm_gic.c                       |   2 +-
 hw/intc/arm_gic_common.c                |   2 +-
 hw/intc/arm_gic_kvm.c                   |   2 +-
 hw/intc/arm_gicv2m.c                    |   2 +-
 hw/intc/arm_gicv3.c                     |   2 +-
 hw/intc/arm_gicv3_common.c              |   2 +-
 hw/intc/arm_gicv3_its_kvm.c             |   2 +-
 hw/intc/arm_gicv3_kvm.c                 |   2 +-
 hw/intc/armv7m_nvic.c                   |   2 +-
 hw/intc/aspeed_vic.c                    |   2 +-
 hw/intc/exynos4210_gic.c                |   3 +-
 hw/intc/grlib_irqmp.c                   |   2 +-
 hw/intc/i8259.c                         |   2 +-
 hw/intc/i8259_common.c                  |   2 +-
 hw/intc/ioapic.c                        |   2 +-
 hw/intc/ioapic_common.c                 |   2 +-
 hw/intc/mips_gic.c                      |   2 +-
 hw/intc/nios2_iic.c                     |   2 +-
 hw/intc/omap_intc.c                     |   4 +-
 hw/intc/openpic.c                       |   2 +-
 hw/intc/openpic_kvm.c                   |   2 +-
 hw/intc/realview_gic.c                  |   2 +-
 hw/intc/s390_flic.c                     |   2 +-
 hw/intc/s390_flic_kvm.c                 |   2 +-
 hw/intc/xics.c                          |   8 +-
 hw/intc/xics_kvm.c                      |   8 +-
 hw/intc/xics_pnv.c                      |   2 +-
 hw/intc/xics_spapr.c                    |   5 +-
 hw/ipack/ipack.c                        |   4 +-
 hw/ipack/tpci200.c                      |   2 +-
 hw/ipmi/ipmi.c                          |   2 +-
 hw/ipmi/ipmi_bmc_extern.c               |   2 +-
 hw/ipmi/ipmi_bmc_sim.c                  |   2 +-
 hw/ipmi/isa_ipmi_bt.c                   |   4 +-
 hw/ipmi/isa_ipmi_kcs.c                  |   4 +-
 hw/isa/i82378.c                         |   2 +-
 hw/isa/isa-bus.c                        |   2 +-
 hw/isa/lpc_ich9.c                       |   4 +-
 hw/isa/pc87312.c                        |   2 +-
 hw/isa/piix4.c                          |   2 +-
 hw/isa/vt82c686.c                       |   8 +-
 hw/mem/nvdimm.c                         |   6 +-
 hw/mem/pc-dimm.c                        |  18 +++--
 hw/mips/cps.c                           |   2 +-
 hw/mips/gt64xxx_pci.c                   |   2 +-
 hw/misc/applesmc.c                      |   2 +-
 hw/misc/arm11scu.c                      |   2 +-
 hw/misc/arm_sysctl.c                    |   2 +-
 hw/misc/aspeed_scu.c                    |   2 +-
 hw/misc/aspeed_sdmc.c                   |   2 +-
 hw/misc/bcm2835_mbox.c                  |   2 +-
 hw/misc/bcm2835_property.c              |   2 +-
 hw/misc/debugexit.c                     |   2 +-
 hw/misc/eccmemctl.c                     |   2 +-
 hw/misc/edu.c                           |   4 +-
 hw/misc/hyperv_testdev.c                |   2 +-
 hw/misc/imx6_src.c                      |   2 +-
 hw/misc/ivshmem.c                       |  31 +++----
 hw/misc/macio/cuda.c                    |   2 +-
 hw/misc/macio/macio.c                   |   8 +-
 hw/misc/max111x.c                       |   4 +-
 hw/misc/mips_cmgcr.c                    |   2 +-
 hw/misc/mips_cpc.c                      |   2 +-
 hw/misc/mips_itu.c                      |   2 +-
 hw/misc/pc-testdev.c                    |   2 +-
 hw/misc/pci-testdev.c                   |   2 +-
 hw/misc/pvpanic.c                       |   2 +-
 hw/misc/sga.c                           |   2 +-
 hw/misc/tmp105.c                        |   4 +-
 hw/misc/unimp.c                         |   2 +-
 hw/misc/vmport.c                        |   2 +-
 hw/net/allwinner_emac.c                 |   2 +-
 hw/net/cadence_gem.c                    |   2 +-
 hw/net/dp8393x.c                        |   2 +-
 hw/net/e1000.c                          |   2 +-
 hw/net/e1000e.c                         |   2 +-
 hw/net/eepro100.c                       |   2 +-
 hw/net/fsl_etsec/etsec.c                |   2 +-
 hw/net/ftgmac100.c                      |   2 +-
 hw/net/imx_fec.c                        |   2 +-
 hw/net/mcf_fec.c                        |   2 +-
 hw/net/ne2000-isa.c                     |   6 +-
 hw/net/ne2000.c                         |   2 +-
 hw/net/pcnet-pci.c                      |   2 +-
 hw/net/rocker/qmp-norocker.c            |   9 ++-
 hw/net/rocker/rocker.c                  |   5 +-
 hw/net/rocker/rocker_of_dpa.c           |   2 +-
 hw/net/rtl8139.c                        |   2 +-
 hw/net/spapr_llan.c                     |   2 +-
 hw/net/virtio-net.c                     |   7 +-
 hw/net/vmxnet3.c                        |   4 +-
 hw/net/xilinx_axienet.c                 |   2 +-
 hw/net/xilinx_ethlite.c                 |   2 +-
 hw/nvram/fw_cfg.c                       |   6 +-
 hw/nvram/mac_nvram.c                    |   4 +-
 hw/nvram/spapr_nvram.c                  |   2 +-
 hw/pci-bridge/dec.c                     |   4 +-
 hw/pci-bridge/gen_pcie_root_port.c      |   2 +-
 hw/pci-bridge/ioh3420.c                 |   2 +-
 hw/pci-bridge/pci_bridge_dev.c          |   4 +-
 hw/pci-bridge/pci_expander_bridge.c     |  10 ++-
 hw/pci-bridge/pcie_root_port.c          |   2 +-
 hw/pci-host/apb.c                       |   4 +-
 hw/pci-host/bonito.c                    |   2 +-
 hw/pci-host/gpex.c                      |   2 +-
 hw/pci-host/grackle.c                   |   2 +-
 hw/pci-host/piix.c                      |  15 ++--
 hw/pci-host/ppce500.c                   |   2 +-
 hw/pci-host/prep.c                      |   4 +-
 hw/pci-host/q35.c                       |  14 ++--
 hw/pci-host/uninorth.c                  |   9 ++-
 hw/pci-host/versatile.c                 |   4 +-
 hw/pci-host/xilinx-pcie.c               |   2 +-
 hw/pci/msi.c                            |   2 +-
 hw/pci/msix.c                           |   4 +-
 hw/pci/pci-stub.c                       |   2 +-
 hw/pci/pci.c                            |  24 +++---
 hw/pci/pcie.c                           |   8 +-
 hw/pci/pcie_aer.c                       |   2 +-
 hw/pci/shpc.c                           |   8 +-
 hw/ppc/e500.c                           |   3 +-
 hw/ppc/mac_newworld.c                   |   2 +-
 hw/ppc/mac_oldworld.c                   |   2 +-
 hw/ppc/pnv.c                            |  10 +--
 hw/ppc/pnv_core.c                       |   7 +-
 hw/ppc/pnv_lpc.c                        |   2 +-
 hw/ppc/pnv_occ.c                        |   2 +-
 hw/ppc/pnv_psi.c                        |   2 +-
 hw/ppc/pnv_xscom.c                      |   2 +-
 hw/ppc/prep.c                           |   2 +-
 hw/ppc/prep_systemio.c                  |   2 +-
 hw/ppc/rs6000_mc.c                      |   2 +-
 hw/ppc/spapr.c                          |  61 ++++++++------
 hw/ppc/spapr_cpu_core.c                 |   9 ++-
 hw/ppc/spapr_drc.c                      |  15 ++--
 hw/ppc/spapr_hcall.c                    |   2 +-
 hw/ppc/spapr_iommu.c                    |   2 +-
 hw/ppc/spapr_pci.c                      |  12 +--
 hw/ppc/spapr_rng.c                      |   2 +-
 hw/ppc/spapr_rtc.c                      |   5 +-
 hw/ppc/spapr_vio.c                      |   2 +-
 hw/s390x/3270-ccw.c                     |   2 +-
 hw/s390x/ccw-device.c                   |   2 +-
 hw/s390x/css-bridge.c                   |   2 +-
 hw/s390x/css.c                          |  10 +--
 hw/s390x/event-facility.c               |   6 +-
 hw/s390x/ipl.c                          |   4 +-
 hw/s390x/s390-ccw.c                     |   7 +-
 hw/s390x/s390-pci-bus.c                 |  12 +--
 hw/s390x/s390-skeys.c                   |   9 ++-
 hw/s390x/s390-virtio-ccw.c              |  25 +++---
 hw/s390x/s390-virtio.c                  |   2 +-
 hw/s390x/sclp.c                         |   2 +-
 hw/s390x/virtio-ccw.c                   |  41 ++++++----
 hw/scsi/esp-pci.c                       |   4 +-
 hw/scsi/esp.c                           |   2 +-
 hw/scsi/lsi53c895a.c                    |   4 +-
 hw/scsi/megasas.c                       |   2 +-
 hw/scsi/mptsas.c                        |   2 +-
 hw/scsi/scsi-bus.c                      |   9 ++-
 hw/scsi/scsi-disk.c                     |  13 +--
 hw/scsi/scsi-generic.c                  |   2 +-
 hw/scsi/spapr_vscsi.c                   |   2 +-
 hw/scsi/vhost-scsi-common.c             |   2 +-
 hw/scsi/vhost-scsi.c                    |   4 +-
 hw/scsi/virtio-scsi-dataplane.c         |   2 +-
 hw/scsi/virtio-scsi.c                   |  16 ++--
 hw/scsi/vmw_pvscsi.c                    |   8 +-
 hw/sd/pl181.c                           |   2 +-
 hw/sd/sd.c                              |   4 +-
 hw/sd/sdhci.c                           |   4 +-
 hw/sd/ssi-sd.c                          |   2 +-
 hw/sh4/sh_pci.c                         |   2 +-
 hw/smbios/smbios-stub.c                 |   2 +-
 hw/smbios/smbios.c                      |   2 +-
 hw/sparc/sun4m.c                        |   4 +-
 hw/sparc64/sun4u.c                      |   6 +-
 hw/ssi/aspeed_smc.c                     |   2 +-
 hw/ssi/imx_spi.c                        |   2 +-
 hw/ssi/ssi.c                            |   2 +-
 hw/ssi/xilinx_spips.c                   |   4 +-
 hw/timer/a9gtimer.c                     |   2 +-
 hw/timer/altera_timer.c                 |   2 +-
 hw/timer/arm_mptimer.c                  |   2 +-
 hw/timer/arm_timer.c                    |   2 +-
 hw/timer/aspeed_timer.c                 |   2 +-
 hw/timer/hpet.c                         |   2 +-
 hw/timer/i8254.c                        |   2 +-
 hw/timer/i8254_common.c                 |   2 +-
 hw/timer/imx_epit.c                     |   2 +-
 hw/timer/imx_gpt.c                      |   2 +-
 hw/timer/lm32_timer.c                   |   2 +-
 hw/timer/m48t59-isa.c                   |   2 +-
 hw/timer/m48t59.c                       |   4 +-
 hw/timer/mc146818rtc.c                  |   7 +-
 hw/timer/milkymist-sysctl.c             |   2 +-
 hw/timer/pxa2xx_timer.c                 |   2 +-
 hw/timer/xilinx_timer.c                 |   2 +-
 hw/tpm/tpm_tis.c                        |   2 +-
 hw/usb/bus.c                            |  24 +++---
 hw/usb/dev-audio.c                      |   4 +-
 hw/usb/dev-bluetooth.c                  |   4 +-
 hw/usb/dev-hid.c                        |  10 +--
 hw/usb/dev-hub.c                        |   4 +-
 hw/usb/dev-mtp.c                        |   2 +-
 hw/usb/dev-network.c                    |   4 +-
 hw/usb/dev-serial.c                     |   2 +-
 hw/usb/dev-smartcard-reader.c           |   4 +-
 hw/usb/dev-storage.c                    |  12 +--
 hw/usb/dev-uas.c                        |   4 +-
 hw/usb/dev-wacom.c                      |   4 +-
 hw/usb/hcd-ehci-pci.c                   |   2 +-
 hw/usb/hcd-ehci-sysbus.c                |   2 +-
 hw/usb/hcd-ehci.c                       |   6 +-
 hw/usb/hcd-ohci.c                       |   6 +-
 hw/usb/hcd-uhci.c                       |   4 +-
 hw/usb/hcd-xhci.c                       |   2 +-
 hw/usb/host-libusb.c                    |   4 +-
 hw/usb/redirect.c                       |   4 +-
 hw/vfio/amd-xgbe.c                      |   2 +-
 hw/vfio/calxeda-xgmac.c                 |   2 +-
 hw/vfio/ccw.c                           |  12 +--
 hw/vfio/common.c                        |   7 +-
 hw/vfio/pci-quirks.c                    |   6 +-
 hw/vfio/pci.c                           |  22 ++---
 hw/vfio/platform.c                      |   9 ++-
 hw/virtio/vhost-vsock.c                 |   8 +-
 hw/virtio/virtio-balloon.c              |  14 ++--
 hw/virtio/virtio-bus.c                  |   2 +-
 hw/virtio/virtio-crypto-pci.c           |   3 +-
 hw/virtio/virtio-crypto.c               |  10 ++-
 hw/virtio/virtio-mmio.c                 |   2 +-
 hw/virtio/virtio-pci.c                  |  38 +++++----
 hw/virtio/virtio-rng.c                  |   8 +-
 hw/virtio/virtio.c                      |   4 +-
 hw/watchdog/wdt_aspeed.c                |   2 +-
 hw/watchdog/wdt_diag288.c               |   4 +-
 hw/watchdog/wdt_i6300esb.c              |   2 +-
 hw/watchdog/wdt_ib700.c                 |   2 +-
 hw/xen/xen-host-pci-device.c            |  12 +--
 hw/xen/xen_pt.c                         |   2 +-
 hw/xen/xen_pt_config_init.c             |   4 +-
 hw/xen/xen_pt_graphics.c                |   2 +-
 io/channel-buffer.c                     |  10 +--
 io/channel-command.c                    |  14 ++--
 io/channel-file.c                       |  12 +--
 io/channel-socket.c                     |  30 +++----
 io/channel-tls.c                        |  14 ++--
 io/channel-util.c                       |   2 +-
 io/channel-websock.c                    |  26 +++---
 io/channel.c                            |  20 ++---
 io/dns-resolver.c                       |   6 +-
 io/task.c                               |   2 +-
 iothread.c                              |   8 +-
 memory.c                                |  21 ++---
 memory_mapping.c                        |   2 +-
 migration/colo-failover.c               |   4 +-
 migration/colo.c                        |  18 ++---
 migration/exec.c                        |   5 +-
 migration/fd.c                          |   5 +-
 migration/migration.c                   |  37 ++++-----
 migration/rdma.c                        |  27 ++++---
 migration/savevm.c                      |  14 ++--
 migration/socket.c                      |  16 ++--
 migration/tls.c                         |   6 +-
 monitor.c                               |  43 +++++-----
 nbd/client.c                            |  25 +++---
 nbd/common.c                            |   2 +-
 nbd/server.c                            |   2 +-
 net/colo-compare.c                      |  19 +++--
 net/dump.c                              |  15 ++--
 net/filter-buffer.c                     |   9 ++-
 net/filter-mirror.c                     |  16 ++--
 net/filter-rewriter.c                   |   2 +-
 net/filter.c                            |  18 +++--
 net/hub.c                               |   2 +-
 net/l2tpv3.c                            |   2 +-
 net/net.c                               |  21 ++---
 net/netmap.c                            |   5 +-
 net/slirp.c                             |   2 +-
 net/socket.c                            |   2 +-
 net/tap-bsd.c                           |  10 ++-
 net/tap-linux.c                         |   5 +-
 net/tap-solaris.c                       |   7 +-
 net/tap-stub.c                          |   5 +-
 net/tap-win32.c                         |   2 +-
 net/tap.c                               |  15 ++--
 net/vde.c                               |   2 +-
 net/vhost-user.c                        |   7 +-
 numa.c                                  |  13 +--
 qapi/opts-visitor.c                     |  26 +++---
 qapi/qapi-clone-visitor.c               |  20 ++---
 qapi/qapi-dealloc-visitor.c             |  22 ++---
 qapi/qapi-util.c                        |   2 +-
 qapi/qmp-dispatch.c                     |   5 +-
 qapi/qobject-input-visitor.c            |  48 ++++++-----
 qapi/qobject-output-visitor.c           |  20 ++---
 qapi/string-input-visitor.c             |  19 ++---
 qapi/string-output-visitor.c            |  14 ++--
 qdev-monitor.c                          |  23 +++---
 qemu-img.c                              |   4 +-
 qemu-nbd.c                              |   3 +-
 qga/commands-posix.c                    | 138 +++++++++++++++++---------------
 qga/commands-win32.c                    |  83 ++++++++++---------
 qga/commands.c                          |  16 ++--
 qga/main.c                              |   2 +-
 qga/vss-win32.c                         |   2 +-
 qmp.c                                   |  76 +++++++++---------
 qobject/json-parser.c                   |   3 +-
 qobject/qdict.c                         |   4 +-
 qobject/qjson.c                         |   5 +-
 qom/cpu.c                               |  10 +--
 qom/object.c                            | 135 ++++++++++++++++---------------
 qom/object_interfaces.c                 |  13 +--
 qom/qom-qobject.c                       |   4 +-
 qtest.c                                 |   3 +-
 replication.c                           |   8 +-
 stubs/arch-query-cpu-def.c              |   2 +-
 stubs/arch-query-cpu-model-baseline.c   |   2 +-
 stubs/arch-query-cpu-model-comparison.c |   2 +-
 stubs/arch-query-cpu-model-expansion.c  |   2 +-
 stubs/migr-blocker.c                    |   2 +-
 stubs/monitor.c                         |   2 +-
 stubs/uuid.c                            |   2 +-
 stubs/vmgenid.c                         |   2 +-
 stubs/vmstate.c                         |   2 +-
 stubs/xen-hvm.c                         |   4 +-
 target/alpha/cpu.c                      |   2 +-
 target/arm/cpu.c                        |   2 +-
 target/arm/cpu64.c                      |   5 +-
 target/arm/helper.c                     |   2 +-
 target/arm/monitor.c                    |   2 +-
 target/cris/cpu.c                       |   2 +-
 target/hppa/cpu.c                       |   2 +-
 target/i386/arch_memory_mapping.c       |   2 +-
 target/i386/cpu.c                       |  66 ++++++++-------
 target/lm32/cpu.c                       |   2 +-
 target/m68k/cpu.c                       |   2 +-
 target/microblaze/cpu.c                 |   2 +-
 target/mips/cpu.c                       |   2 +-
 target/moxie/cpu.c                      |   2 +-
 target/nios2/cpu.c                      |   2 +-
 target/openrisc/cpu.c                   |   2 +-
 target/ppc/compat.c                     |   5 +-
 target/ppc/translate_init.c             |  12 +--
 target/s390x/cpu.c                      |   6 +-
 target/s390x/cpu_models.c               |  32 ++++----
 target/s390x/helper.c                   |   5 +-
 target/s390x/kvm.c                      |   5 +-
 target/sh4/cpu.c                        |   2 +-
 target/sparc/cpu.c                      |   6 +-
 target/tilegx/cpu.c                     |   2 +-
 target/tricore/cpu.c                    |   2 +-
 target/unicore32/cpu.c                  |   2 +-
 target/xtensa/cpu.c                     |   2 +-
 tests/check-qom-proplist.c              |  12 +--
 tests/test-crypto-block.c               |   6 +-
 tests/test-crypto-tlscredsx509.c        |   2 +-
 tests/test-crypto-tlssession.c          |   2 +-
 tests/test-io-channel-tls.c             |   2 +-
 tests/test-logging.c                    |   3 +-
 tests/test-qapi-util.c                  |  10 +--
 tests/test-qdev-global-props.c          |   4 +-
 tests/test-qemu-opts.c                  |   2 +-
 tests/test-qmp-commands.c               |  17 ++--
 tests/test-qmp-event.c                  |   3 +-
 tests/test-visitor-serialization.c      |  25 +++---
 tpm.c                                   |   8 +-
 trace/qmp.c                             |   8 +-
 ui/console.c                            |  12 +--
 ui/gtk.c                                |   2 +-
 ui/input-legacy.c                       |   2 +-
 ui/input-linux.c                        |  14 ++--
 ui/input.c                              |   6 +-
 ui/spice-core.c                         |   4 +-
 ui/vnc-auth-sasl.c                      |   2 +-
 ui/vnc.c                                |  30 +++----
 util/aio-posix.c                        |   3 +-
 util/aio-win32.c                        |   3 +-
 util/async.c                            |   2 +-
 util/base64.c                           |   2 +-
 util/error.c                            |   2 +-
 util/keyval.c                           |   9 ++-
 util/log.c                              |   4 +-
 util/main-loop.c                        |   2 +-
 util/qemu-config.c                      |  15 ++--
 util/qemu-option.c                      |  42 +++++-----
 util/qemu-sockets.c                     |  76 ++++++++++--------
 util/throttle.c                         |   2 +-
 vl.c                                    |  44 +++++-----
 815 files changed, 3406 insertions(+), 2952 deletions(-)
include/qapi/visitor.h +26 -21
index 4721c39ae3..55ad2cb5b9 100644
@@ -296,7 +296,7 @@ void visit_free(Visitor *v);
  * used for QAPI unions, and maps to JSON objects?
  */
 void visit_start_struct(Visitor *v, const char *name, void **obj,
-                        size_t size, Error **errp);
+                        size_t size, Error *errp[static 1]);
 
 /*
  * Prepare for completing an object visit.
@@ -309,7 +309,7 @@ void visit_start_struct(Visitor *v, const char *name, void **obj,
  * last chance to report errors.  May be skipped on a cleanup path,
  * where there is no need to check for further errors.
  */
-void visit_check_struct(Visitor *v, Error **errp);
+void visit_check_struct(Visitor *v, Error *errp[static 1]);
 
 /*
  * Complete an object visit started earlier.
@@ -353,7 +353,7 @@ void visit_end_struct(Visitor *v, void **obj);
  * examples above.
  */
 void visit_start_list(Visitor *v, const char *name, GenericList **list,
-                      size_t size, Error **errp);
+                      size_t size, Error *errp[static 1]);
 
 /*
  * Iterate over a GenericList during a non-virtual list visit.
@@ -382,7 +382,7 @@ GenericList *visit_next_list(Visitor *v, GenericList *tail, size_t size);
  * last chance to report errors.  May be skipped on a cleanup path,
  * where there is no need to check for further errors.
  */
-void visit_check_list(Visitor *v, Error **errp);
+void visit_check_list(Visitor *v, Error *errp[static 1]);
 
 /*
  * Complete a list visit started earlier.
@@ -418,7 +418,7 @@ void visit_end_list(Visitor *v, void **list);
  */
 void visit_start_alternate(Visitor *v, const char *name,
                            GenericAlternate **obj, size_t size,
-                           bool promote_int, Error **errp);
+                           bool promote_int, Error *errp[static 1]);
 
 /*
  * Finish visiting an alternate type.
@@ -471,7 +471,7 @@ bool visit_optional(Visitor *v, const char *name, bool *present);
  * that visit_type_str() must have no unwelcome side effects.
  */
 void visit_type_enum(Visitor *v, const char *name, int *obj,
-                     const char *const strings[], Error **errp);
+                     const char *const strings[], Error *errp[static 1]);
 
 /*
  * Check if visitor is an input visitor.
@@ -489,28 +489,29 @@ bool visit_is_input(Visitor *v);
  * @obj must be non-NULL.  Input visitors set *@obj to the value;
  * other visitors will leave *@obj unchanged.
  */
-void visit_type_int(Visitor *v, const char *name, int64_t *obj, Error **errp);
+void visit_type_int(Visitor *v, const char *name, int64_t *obj,
+		    Error *errp[static 1]);
 
 /*
  * Visit a uint8_t value.
  * Like visit_type_int(), except clamps the value to uint8_t range.
  */
 void visit_type_uint8(Visitor *v, const char *name, uint8_t *obj,
-                      Error **errp);
+                      Error *errp[static 1]);
 
 /*
  * Visit a uint16_t value.
  * Like visit_type_int(), except clamps the value to uint16_t range.
  */
 void visit_type_uint16(Visitor *v, const char *name, uint16_t *obj,
-                       Error **errp);
+                       Error *errp[static 1]);
 
 /*
  * Visit a uint32_t value.
  * Like visit_type_int(), except clamps the value to uint32_t range.
  */
 void visit_type_uint32(Visitor *v, const char *name, uint32_t *obj,
-                       Error **errp);
+                       Error *errp[static 1]);
 
 /*
  * Visit a uint64_t value.
@@ -518,34 +519,35 @@ void visit_type_uint32(Visitor *v, const char *name, uint32_t *obj,
  * that is, ensures it is unsigned.
  */
 void visit_type_uint64(Visitor *v, const char *name, uint64_t *obj,
-                       Error **errp);
+                       Error *errp[static 1]);
 
 /*
  * Visit an int8_t value.
  * Like visit_type_int(), except clamps the value to int8_t range.
  */
-void visit_type_int8(Visitor *v, const char *name, int8_t *obj, Error **errp);
+void visit_type_int8(Visitor *v, const char *name, int8_t *obj,
+		     Error *errp[static 1]);
 
 /*
  * Visit an int16_t value.
  * Like visit_type_int(), except clamps the value to int16_t range.
  */
 void visit_type_int16(Visitor *v, const char *name, int16_t *obj,
-                      Error **errp);
+                      Error *errp[static 1]);
 
 /*
  * Visit an int32_t value.
  * Like visit_type_int(), except clamps the value to int32_t range.
  */
 void visit_type_int32(Visitor *v, const char *name, int32_t *obj,
-                      Error **errp);
+                      Error *errp[static 1]);
 
 /*
  * Visit an int64_t value.
  * Identical to visit_type_int().
  */
 void visit_type_int64(Visitor *v, const char *name, int64_t *obj,
-                      Error **errp);
+                      Error *errp[static 1]);
 
 /*
  * Visit a uint64_t value.
@@ -554,7 +556,7 @@ void visit_type_int64(Visitor *v, const char *name, int64_t *obj,
  * values.
  */
 void visit_type_size(Visitor *v, const char *name, uint64_t *obj,
-                     Error **errp);
+                     Error *errp[static 1]);
 
 /*
  * Visit a boolean value.
@@ -565,7 +567,8 @@ void visit_type_size(Visitor *v, const char *name, uint64_t *obj,
  * @obj must be non-NULL.  Input visitors set *@obj to the value;
  * other visitors will leave *@obj unchanged.
  */
-void visit_type_bool(Visitor *v, const char *name, bool *obj, Error **errp);
+void visit_type_bool(Visitor *v, const char *name, bool *obj,
+		     Error *errp[static 1]);
 
 /*
  * Visit a string value.
@@ -583,7 +586,8 @@ void visit_type_bool(Visitor *v, const char *name, bool *obj, Error **errp);
  *
  * FIXME: Callers that try to output NULL *obj should not be allowed.
  */
-void visit_type_str(Visitor *v, const char *name, char **obj, Error **errp);
+void visit_type_str(Visitor *v, const char *name, char **obj,
+		    Error *errp[static 1]);
 
 /*
  * Visit a number (i.e. double) value.
@@ -596,7 +600,7 @@ void visit_type_str(Visitor *v, const char *name, char **obj, Error **errp);
  * document if infinity or NaN are not permitted.
  */
 void visit_type_number(Visitor *v, const char *name, double *obj,
-                       Error **errp);
+                       Error *errp[static 1]);
 
 /*
  * Visit an arbitrary value.
@@ -612,7 +616,8 @@ void visit_type_number(Visitor *v, const char *name, double *obj,
  * E.g. the visitor returned by qobject_input_visitor_new_keyval()
  * can't create numbers or booleans, only strings.
  */
-void visit_type_any(Visitor *v, const char *name, QObject **obj, Error **errp);
+void visit_type_any(Visitor *v, const char *name, QObject **obj,
+		    Error *errp[static 1]);
 
 /*
  * Visit a JSON null value.
@@ -624,6 +629,6 @@ void visit_type_any(Visitor *v, const char *name, QObject **obj, Error **errp);
  * needed; rather, this is a witness that an explicit null value is
  * expected rather than any other type.
  */
-void visit_type_null(Visitor *v, const char *name, Error **errp);
+void visit_type_null(Visitor *v, const char *name, Error *errp[static 1]);
 
 #endif
block/nbd-client.h +1 -1
index 891ba44a20..4d663017b3 100644
@@ -39,7 +39,7 @@ int nbd_client_init(BlockDriverState *bs,
                     const char *export_name,
                     QCryptoTLSCreds *tlscreds,
                     const char *hostname,
-                    Error **errp);
+                    Error *errp[static 1]);
 void nbd_client_close(BlockDriverState *bs);
 
 int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int count);
block/qcow2.h +4 -4
index 1801dc30dc..64a16db406 100644
@@ -530,7 +530,7 @@ int qcow2_pre_write_overlap_check(BlockDriverState *bs, int ign, int64_t offset,
 
 int qcow2_change_refcount_order(BlockDriverState *bs, int refcount_order,
                                 BlockDriverAmendStatusCB *status_cb,
-                                void *cb_opaque, Error **errp);
+                                void *cb_opaque, Error *errp[static 1]);
 
 /* qcow2-cluster.c functions */
 int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size,
@@ -539,7 +539,7 @@ int qcow2_write_l1_entry(BlockDriverState *bs, int l1_index);
 int qcow2_decompress_cluster(BlockDriverState *bs, uint64_t cluster_offset);
 int qcow2_encrypt_sectors(BDRVQcow2State *s, int64_t sector_num,
                           uint8_t *out_buf, const uint8_t *in_buf,
-                          int nb_sectors, bool enc, Error **errp);
+                          int nb_sectors, bool enc, Error *errp[static 1]);
 
 int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
                              unsigned int *bytes, uint64_t *cluster_offset);
@@ -567,12 +567,12 @@ int qcow2_snapshot_goto(BlockDriverState *bs, const char *snapshot_id);
 int qcow2_snapshot_delete(BlockDriverState *bs,
                           const char *snapshot_id,
                           const char *name,
-                          Error **errp);
+                          Error *errp[static 1]);
 int qcow2_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab);
 int qcow2_snapshot_load_tmp(BlockDriverState *bs,
                             const char *snapshot_id,
                             const char *name,
-                            Error **errp);
+                            Error *errp[static 1]);
 
 void qcow2_free_snapshots(BlockDriverState *bs);
 int qcow2_read_snapshots(BlockDriverState *bs);
block/vhdx.h +1 -1
index 7003ab7a79..ad7e772043 100644
@@ -413,7 +413,7 @@ uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size,
 bool vhdx_checksum_is_valid(uint8_t *buf, size_t size, int crc_offset);
 
 int vhdx_parse_log(BlockDriverState *bs, BDRVVHDXState *s, bool *flushed,
-                   Error **errp);
+                   Error *errp[static 1]);
 
 int vhdx_log_write_and_flush(BlockDriverState *bs, BDRVVHDXState *s,
                              void *data, uint32_t length, uint64_t offset);
crypto/blockpriv.h +2 -2
index 68f0f06704..54d2af2f20 100644
@@ -82,7 +82,7 @@ int qcrypto_block_decrypt_helper(QCryptoCipher *cipher,
                                  uint64_t startsector,
                                  uint8_t *buf,
                                  size_t len,
-                                 Error **errp);
+                                 Error *errp[static 1]);
 
 int qcrypto_block_encrypt_helper(QCryptoCipher *cipher,
                                  size_t niv,
@@ -91,6 +91,6 @@ int qcrypto_block_encrypt_helper(QCryptoCipher *cipher,
                                  uint64_t startsector,
                                  uint8_t *buf,
                                  size_t len,
-                                 Error **errp);
+                                 Error *errp[static 1]);
 
 #endif /* QCRYPTO_BLOCKPRIV_H */
crypto/hmac.h +5 -5
index 0d3acd728a..e2cccfd9be 100644
@@ -53,7 +53,7 @@ bool qcrypto_hmac_supports(QCryptoHashAlgorithm alg);
  */
 QCryptoHmac *qcrypto_hmac_new(QCryptoHashAlgorithm alg,
                               const uint8_t *key, size_t nkey,
-                              Error **errp);
+                              Error *errp[static 1]);
 
 /**
  * qcrypto_hmac_free:
@@ -88,7 +88,7 @@ int qcrypto_hmac_bytesv(QCryptoHmac *hmac,
                         size_t niov,
                         uint8_t **result,
                         size_t *resultlen,
-                        Error **errp);
+                        Error *errp[static 1]);
 
 /**
  * qcrypto_hmac_bytes:
@@ -114,7 +114,7 @@ int qcrypto_hmac_bytes(QCryptoHmac *hmac,
                        size_t len,
                        uint8_t **result,
                        size_t *resultlen,
-                       Error **errp);
+                       Error *errp[static 1]);
 
 /**
  * qcrypto_hmac_digestv:
@@ -138,7 +138,7 @@ int qcrypto_hmac_digestv(QCryptoHmac *hmac,
                          const struct iovec *iov,
                          size_t niov,
                          char **digest,
-                         Error **errp);
+                         Error *errp[static 1]);
 
 /**
  * qcrypto_hmac_digest:
@@ -161,6 +161,6 @@ int qcrypto_hmac_digest(QCryptoHmac *hmac,
                         const char *buf,
                         size_t len,
                         char **digest,
-                        Error **errp);
+                        Error *errp[static 1]);
 
 #endif
crypto/tlscredspriv.h +2 -2
index 13e9b6c0b2..cb11ff8dcb 100644
@@ -29,12 +29,12 @@ int qcrypto_tls_creds_get_path(QCryptoTLSCreds *creds,
                                const char *filename,
                                bool required,
                                char **cred,
-                               Error **errp);
+                               Error *errp[static 1]);
 
 int qcrypto_tls_creds_get_dh_params_file(QCryptoTLSCreds *creds,
                                          const char *filename,
                                          gnutls_dh_params_t *dh_params,
-                                         Error **errp);
+                                         Error *errp[static 1]);
 
 #endif
 
hw/9pfs/9p.h +2 -2
index c886ba78d2..9e2708e047 100644
@@ -340,8 +340,8 @@ void v9fs_path_sprintf(V9fsPath *path, const char *fmt, ...);
 void v9fs_path_copy(V9fsPath *lhs, V9fsPath *rhs);
 int v9fs_name_to_path(V9fsState *s, V9fsPath *dirpath,
                       const char *name, V9fsPath *path);
-int v9fs_device_realize_common(V9fsState *s, Error **errp);
-void v9fs_device_unrealize_common(V9fsState *s, Error **errp);
+int v9fs_device_realize_common(V9fsState *s, Error *errp[static 1]);
+void v9fs_device_unrealize_common(V9fsState *s, Error *errp[static 1]);
 
 ssize_t pdu_marshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...);
 ssize_t pdu_unmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...);
hw/block/dataplane/virtio-blk.h +1 -1
index db3f47b173..b740749d7a 100644
@@ -21,7 +21,7 @@ typedef struct VirtIOBlockDataPlane VirtIOBlockDataPlane;
 
 void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,
                                   VirtIOBlockDataPlane **dataplane,
-                                  Error **errp);
+                                  Error *errp[static 1]);
 void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s);
 void virtio_blk_data_plane_notify(VirtIOBlockDataPlane *s, VirtQueue *vq);
 
hw/s390x/s390-virtio.h +1 -1
index f2377a3e0e..9bbf9affb9 100644
@@ -27,7 +27,7 @@ void s390_init_ipl_dev(const char *kernel_filename,
                        const char *netboot_fw,
                        bool enforce_bios);
 void s390_create_virtio_net(BusState *bus, const char *name);
-void s390_nmi(NMIState *n, int cpu_index, Error **errp);
+void s390_nmi(NMIState *n, int cpu_index, Error *errp[static 1]);
 void s390_machine_reset(void);
 void s390_memory_init(ram_addr_t mem_size);
 #endif
hw/timer/m48t59-internal.h +1 -1
index 32ae957805..640bf1f5d5 100644
@@ -70,7 +70,7 @@ typedef struct M48t59State {
 uint32_t m48t59_read(M48t59State *NVRAM, uint32_t addr);
 void m48t59_write(M48t59State *NVRAM, uint32_t addr, uint32_t val);
 void m48t59_reset_common(M48t59State *NVRAM);
-void m48t59_realize_common(M48t59State *s, Error **errp);
+void m48t59_realize_common(M48t59State *s, Error *errp[static 1]);
 
 static inline void m48t59_toggle_lock(M48t59State *NVRAM, int lock)
 {
hw/usb/hcd-ehci.h +2 -2
index 938d8aa284..ca7df4cc33 100644
@@ -324,8 +324,8 @@ extern const VMStateDescription vmstate_ehci;
 
 void usb_ehci_init(EHCIState *s, DeviceState *dev);
 void usb_ehci_finalize(EHCIState *s);
-void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp);
-void usb_ehci_unrealize(EHCIState *s, DeviceState *dev, Error **errp);
+void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error *errp[static 1]);
+void usb_ehci_unrealize(EHCIState *s, DeviceState *dev, Error *errp[static 1]);
 void ehci_reset(void *opaque);
 
 #define TYPE_PCI_EHCI "pci-ehci-usb"
hw/vfio/pci.h +2 -2
index a8366bb2a7..91d17117ac 100644
@@ -161,10 +161,10 @@ void vfio_bar_quirk_exit(VFIOPCIDevice *vdev, int nr);
 void vfio_bar_quirk_finalize(VFIOPCIDevice *vdev, int nr);
 void vfio_setup_resetfn_quirk(VFIOPCIDevice *vdev);
 
-int vfio_populate_vga(VFIOPCIDevice *vdev, Error **errp);
+int vfio_populate_vga(VFIOPCIDevice *vdev, Error *errp[static 1]);
 
 int vfio_pci_igd_opregion_init(VFIOPCIDevice *vdev,
                                struct vfio_region_info *info,
-                               Error **errp);
+                               Error *errp[static 1]);
 
 #endif /* HW_VFIO_VFIO_PCI_H */
hw/xen/xen-host-pci-device.h +1 -1
index 4d8d34ecb0..fb320914b7 100644
@@ -38,7 +38,7 @@ typedef struct XenHostPCIDevice {
 
 void xen_host_pci_device_get(XenHostPCIDevice *d, uint16_t domain,
                              uint8_t bus, uint8_t dev, uint8_t func,
-                             Error **errp);
+                             Error *errp[static 1]);
 void xen_host_pci_device_put(XenHostPCIDevice *pci_dev);
 bool xen_host_pci_device_closed(XenHostPCIDevice *d);
 
hw/xen/xen_pt.h +2 -2
index 191d9caea1..d47db9f4b6 100644
@@ -230,7 +230,7 @@ struct XenPCIPassthroughState {
     bool listener_set;
 };
 
-void xen_pt_config_init(XenPCIPassthroughState *s, Error **errp);
+void xen_pt_config_init(XenPCIPassthroughState *s, Error *errp[static 1]);
 void xen_pt_config_delete(XenPCIPassthroughState *s);
 XenPTRegGroup *xen_pt_find_reg_grp(XenPCIPassthroughState *s, uint32_t address);
 XenPTReg *xen_pt_find_reg(XenPTRegGroup *reg_grp, uint32_t address);
@@ -331,5 +331,5 @@ static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev)
 int xen_pt_register_vga_regions(XenHostPCIDevice *dev);
 int xen_pt_unregister_vga_regions(XenHostPCIDevice *dev);
 void xen_pt_setup_vga(XenPCIPassthroughState *s, XenHostPCIDevice *dev,
-                     Error **errp);
+                     Error *errp[static 1]);
 #endif /* XEN_PT_H */
include/block/aio.h +2 -2
index e9aeeaec94..6008d9e6d0 100644
@@ -156,7 +156,7 @@ struct AioContext {
  * They also provide bottom halves, a service to execute a piece of code
  * as soon as possible.
  */
-AioContext *aio_context_new(Error **errp);
+AioContext *aio_context_new(Error *errp[static 1]);
 
 /**
  * aio_context_ref:
@@ -562,6 +562,6 @@ void aio_context_setup(AioContext *ctx);
  */
 void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns,
                                  int64_t grow, int64_t shrink,
-                                 Error **errp);
+                                 Error *errp[static 1]);
 
 #endif
include/block/block.h +39 -30

163 lines not on this page · raw message

include/block/block_backup.h +1 -1
index 8a759477a3..30629dcba6 100644
@@ -34,6 +34,6 @@ void backup_cow_request_begin(CowRequest *req, BlockJob *job,
                               int nb_sectors);
 void backup_cow_request_end(CowRequest *req);
 
-void backup_do_checkpoint(BlockJob *job, Error **errp);
+void backup_do_checkpoint(BlockJob *job, Error *errp[static 1]);
 
 #endif
include/block/block_int.h +11 -8
index cb78c4fa82..3c5670f641 100644
@@ -785,7 +785,8 @@ int is_windows_drive(const char *filename);
  */
 void stream_start(const char *job_id, BlockDriverState *bs,
                   BlockDriverState *base, const char *backing_file_str,
-                  int64_t speed, BlockdevOnError on_error, Error **errp);
+                  int64_t speed, BlockdevOnError on_error,
+                  Error *errp[static 1]);
 
 /**
  * commit_start:
@@ -806,7 +807,7 @@ void stream_start(const char *job_id, BlockDriverState *bs,
 void commit_start(const char *job_id, BlockDriverState *bs,
                   BlockDriverState *base, BlockDriverState *top, int64_t speed,
                   BlockdevOnError on_error, const char *backing_file_str,
-                  const char *filter_node_name, Error **errp);
+                  const char *filter_node_name, Error *errp[static 1]);
 /**
  * commit_active_start:
  * @job_id: The id of the newly-created job, or %NULL to use the
@@ -831,7 +832,7 @@ void commit_active_start(const char *job_id, BlockDriverState *bs,
                          int64_t speed, BlockdevOnError on_error,
                          const char *filter_node_name,
                          BlockCompletionFunc *cb, void *opaque,
-                         bool auto_complete, Error **errp);
+                         bool auto_complete, Error *errp[static 1]);
 /*
  * mirror_start:
  * @job_id: The id of the newly-created job, or %NULL to use the
@@ -864,7 +865,8 @@ void mirror_start(const char *job_id, BlockDriverState *bs,
                   MirrorSyncMode mode, BlockMirrorBackingMode backing_mode,
                   BlockdevOnError on_source_error,
                   BlockdevOnError on_target_error,
-                  bool unmap, const char *filter_node_name, Error **errp);
+                  bool unmap, const char *filter_node_name,
+                  Error *errp[static 1]);
 
 /*
  * backup_job_create:
@@ -895,7 +897,7 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs,
                             BlockdevOnError on_target_error,
                             int creation_flags,
                             BlockCompletionFunc *cb, void *opaque,
-                            BlockJobTxn *txn, Error **errp);
+                            BlockJobTxn *txn, Error *errp[static 1]);
 
 void hmp_drive_add_node(Monitor *mon, const char *optstr);
 
@@ -903,11 +905,11 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,
                                   const char *child_name,
                                   const BdrvChildRole *child_role,
                                   uint64_t perm, uint64_t shared_perm,
-                                  void *opaque, Error **errp);
+                                  void *opaque, Error *errp[static 1]);
 void bdrv_root_unref_child(BdrvChild *child);
 
 int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared,
-                            Error **errp);
+                            Error *errp[static 1]);
 
 /* Default implementation for BlockDriver.bdrv_child_perm() that can be used by
  * block filters: Forward CONSISTENT_READ, WRITE, WRITE_UNCHANGED and RESIZE to
@@ -927,7 +929,8 @@ void bdrv_format_default_perms(BlockDriverState *bs, BdrvChild *c,
                                uint64_t *nperm, uint64_t *nshared);
 
 const char *bdrv_get_parent_name(const BlockDriverState *bs);
-void blk_dev_change_media_cb(BlockBackend *blk, bool load, Error **errp);
+void blk_dev_change_media_cb(BlockBackend *blk, bool load,
+			     Error *errp[static 1]);
 bool blk_dev_has_removable_media(BlockBackend *blk);
 bool blk_dev_has_tray(BlockBackend *blk);
 void blk_dev_eject_request(BlockBackend *blk, bool force);
include/block/blockjob.h +6 -5
index 09c7c694b5..480ee92f1a 100644
@@ -178,7 +178,8 @@ BlockJob *block_job_get(const char *id);
  * @job exists.
  */
 int block_job_add_bdrv(BlockJob *job, const char *name, BlockDriverState *bs,
-                       uint64_t perm, uint64_t shared_perm, Error **errp);
+                       uint64_t perm, uint64_t shared_perm,
+                       Error *errp[static 1]);
 
 /**
  * block_job_remove_all_bdrv:
@@ -198,7 +199,7 @@ void block_job_remove_all_bdrv(BlockJob *job);
  * Set a rate-limiting parameter for the job; the actual meaning may
  * vary depending on the job type.
  */
-void block_job_set_speed(BlockJob *job, int64_t speed, Error **errp);
+void block_job_set_speed(BlockJob *job, int64_t speed, Error *errp[static 1]);
 
 /**
  * block_job_start:
@@ -224,7 +225,7 @@ void block_job_cancel(BlockJob *job);
  *
  * Asynchronously complete the specified job.
  */
-void block_job_complete(BlockJob *job, Error **errp);
+void block_job_complete(BlockJob *job, Error *errp[static 1]);
 
 /**
  * block_job_query:
@@ -232,7 +233,7 @@ void block_job_complete(BlockJob *job, Error **errp);
  *
  * Return information about a job.
  */
-BlockJobInfo *block_job_query(BlockJob *job, Error **errp);
+BlockJobInfo *block_job_query(BlockJob *job, Error *errp[static 1]);
 
 /**
  * block_job_user_pause:
@@ -294,7 +295,7 @@ void block_job_cancel_sync_all(void);
  *
  * Returns the return value from the job.
  */
-int block_job_complete_sync(BlockJob *job, Error **errp);
+int block_job_complete_sync(BlockJob *job, Error *errp[static 1]);
 
 /**
  * block_job_iostatus_reset:
include/block/blockjob_int.h +2 -1
index f13ad05c0d..b4a31bf1b4 100644
@@ -134,7 +134,8 @@ struct BlockJobDriver {
 void *block_job_create(const char *job_id, const BlockJobDriver *driver,
                        BlockDriverState *bs, uint64_t perm,
                        uint64_t shared_perm, int64_t speed, int flags,
-                       BlockCompletionFunc *cb, void *opaque, Error **errp);
+                       BlockCompletionFunc *cb, void *opaque,
+                       Error *errp[static 1]);
 
 /**
  * block_job_sleep_ns:
include/block/dirty-bitmap.h +4 -4
index 9dea14ba03..46fd81ef82 100644
@@ -7,19 +7,19 @@
 BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,
                                           uint32_t granularity,
                                           const char *name,
-                                          Error **errp);
+                                          Error *errp[static 1]);
 void bdrv_create_meta_dirty_bitmap(BdrvDirtyBitmap *bitmap,
                                    int chunk_size);
 void bdrv_release_meta_dirty_bitmap(BdrvDirtyBitmap *bitmap);
 int bdrv_dirty_bitmap_create_successor(BlockDriverState *bs,
                                        BdrvDirtyBitmap *bitmap,
-                                       Error **errp);
+                                       Error *errp[static 1]);
 BdrvDirtyBitmap *bdrv_dirty_bitmap_abdicate(BlockDriverState *bs,
                                             BdrvDirtyBitmap *bitmap,
-                                            Error **errp);
+                                            Error *errp[static 1]);
 BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BlockDriverState *bs,
                                            BdrvDirtyBitmap *bitmap,
-                                           Error **errp);
+                                           Error *errp[static 1]);
 BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs,
                                         const char *name);
 void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap);
include/block/nbd.h +7 -6
index 416257abca..cf0f523ef9 100644
@@ -128,15 +128,16 @@ ssize_t nbd_wr_syncv(QIOChannel *ioc,
                      size_t niov,
                      size_t length,
                      bool do_read,
-                     Error **errp);
+                     Error *errp[static 1]);
 int nbd_receive_negotiate(QIOChannel *ioc, const char *name, uint16_t *flags,
                           QCryptoTLSCreds *tlscreds, const char *hostname,
                           QIOChannel **outioc,
-                          off_t *size, Error **errp);
+                          off_t *size, Error *errp[static 1]);
 int nbd_init(int fd, QIOChannelSocket *sioc, uint16_t flags, off_t size,
-             Error **errp);
+             Error *errp[static 1]);
 ssize_t nbd_send_request(QIOChannel *ioc, NBDRequest *request);
-ssize_t nbd_receive_reply(QIOChannel *ioc, NBDReply *reply, Error **errp);
+ssize_t nbd_receive_reply(QIOChannel *ioc, NBDReply *reply,
+			  Error *errp[static 1]);
 int nbd_client(int fd);
 int nbd_disconnect(int fd);
 
@@ -146,7 +147,7 @@ typedef struct NBDClient NBDClient;
 NBDExport *nbd_export_new(BlockDriverState *bs, off_t dev_offset, off_t size,
                           uint16_t nbdflags, void (*close)(NBDExport *),
                           bool writethrough, BlockBackend *on_eject_blk,
-                          Error **errp);
+                          Error *errp[static 1]);
 void nbd_export_close(NBDExport *exp);
 void nbd_export_get(NBDExport *exp);
 void nbd_export_put(NBDExport *exp);
@@ -167,6 +168,6 @@ void nbd_client_get(NBDClient *client);
 void nbd_client_put(NBDClient *client);
 
 void nbd_server_start(SocketAddress *addr, const char *tls_creds,
-                      Error **errp);
+                      Error *errp[static 1]);
 
 #endif
include/block/qapi.h +4 -3
index 82ba4b63a0..3d9d5af97f 100644
@@ -30,13 +30,14 @@
 #include "block/snapshot.h"
 
 BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
-                                        BlockDriverState *bs, Error **errp);
+                                        BlockDriverState *bs,
+                                        Error *errp[static 1]);
 int bdrv_query_snapshot_info_list(BlockDriverState *bs,
                                   SnapshotInfoList **p_list,
-                                  Error **errp);
+                                  Error *errp[static 1]);
 void bdrv_query_image_info(BlockDriverState *bs,
                            ImageInfo **p_info,
-                           Error **errp);
+                           Error *errp[static 1]);
 
 void bdrv_snapshot_dump(fprintf_function func_fprintf, void *f,
                         QEMUSnapshotInfo *sn);
include/block/snapshot.h +6 -6
index e5c0553115..62cd81d6f3 100644
@@ -52,7 +52,7 @@ bool bdrv_snapshot_find_by_id_and_name(BlockDriverState *bs,
                                        const char *id,
                                        const char *name,
                                        QEMUSnapshotInfo *sn_info,
-                                       Error **errp);
+                                       Error *errp[static 1]);
 int bdrv_can_snapshot(BlockDriverState *bs);
 int bdrv_snapshot_create(BlockDriverState *bs,
                          QEMUSnapshotInfo *sn_info);
@@ -61,19 +61,19 @@ int bdrv_snapshot_goto(BlockDriverState *bs,
 int bdrv_snapshot_delete(BlockDriverState *bs,
                          const char *snapshot_id,
                          const char *name,
-                         Error **errp);
+                         Error *errp[static 1]);
 int bdrv_snapshot_delete_by_id_or_name(BlockDriverState *bs,
                                        const char *id_or_name,
-                                       Error **errp);
+                                       Error *errp[static 1]);
 int bdrv_snapshot_list(BlockDriverState *bs,
                        QEMUSnapshotInfo **psn_info);
 int bdrv_snapshot_load_tmp(BlockDriverState *bs,
                            const char *snapshot_id,
                            const char *name,
-                           Error **errp);
+                           Error *errp[static 1]);
 int bdrv_snapshot_load_tmp_by_id_or_name(BlockDriverState *bs,
                                          const char *id_or_name,
-                                         Error **errp);
+                                         Error *errp[static 1]);
 
 
 /* Group operations. All block drivers are involved.
@@ -82,7 +82,7 @@ int bdrv_snapshot_load_tmp_by_id_or_name(BlockDriverState *bs,
 
 bool bdrv_all_can_snapshot(BlockDriverState **first_bad_bs);
 int bdrv_all_delete_snapshot(const char *name, BlockDriverState **first_bsd_bs,
-                             Error **err);
+                             Error *err[static 1]);
 int bdrv_all_goto_snapshot(const char *name, BlockDriverState **first_bsd_bs);
 int bdrv_all_find_snapshot(const char *name, BlockDriverState **first_bad_bs);
 int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn,
include/chardev/char-fd.h +1 -1
index 55ae5b47b0..e23c130c1f 100644
@@ -39,6 +39,6 @@ typedef struct FDChardev {
 #define FD_CHARDEV(obj) OBJECT_CHECK(FDChardev, (obj), TYPE_CHARDEV_FD)
 
 void qemu_chr_open_fd(Chardev *chr, int fd_in, int fd_out);
-int qmp_chardev_open_file_source(char *src, int flags, Error **errp);
+int qmp_chardev_open_file_source(char *src, int flags, Error *errp[static 1]);
 
 #endif /* CHAR_FD_H */
include/chardev/char-fe.h +2 -2
index 2cbb262f66..7446826fa0 100644
@@ -26,7 +26,7 @@ struct CharBackend {
  *
  * Returns: false on error.
  */
-bool qemu_chr_fe_init(CharBackend *b, Chardev *s, Error **errp);
+bool qemu_chr_fe_init(CharBackend *b, Chardev *s, Error *errp[static 1]);
 
 /**
  * @qemu_chr_fe_deinit:
@@ -102,7 +102,7 @@ void qemu_chr_fe_disconnect(CharBackend *be);
  * Wait for characted backend to be connected, return < 0 on error or
  * if no assicated Chardev.
  */
-int qemu_chr_fe_wait_connected(CharBackend *be, Error **errp);
+int qemu_chr_fe_wait_connected(CharBackend *be, Error *errp[static 1]);
 
 /**
  * @qemu_chr_fe_set_echo:
include/chardev/char-win.h +2 -1
index fa59e9e423..cae26c67cf 100644
@@ -45,7 +45,8 @@ typedef struct {
 #define WIN_CHARDEV(obj) OBJECT_CHECK(WinChardev, (obj), TYPE_CHARDEV_WIN)
 
 void win_chr_set_file(Chardev *chr, HANDLE file, bool keep_open);
-int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp);
+int win_chr_serial_init(Chardev *chr, const char *filename,
+			Error *errp[static 1]);
 int win_chr_pipe_poll(void *opaque);
 
 #endif /* CHAR_WIN_H */
include/chardev/char.h +5 -4
index 8a9ade4931..a9daceec93 100644
@@ -68,7 +68,7 @@ struct Chardev {
  * Returns: a new character backend
  */
 Chardev *qemu_chr_new_from_opts(QemuOpts *opts,
-                                Error **errp);
+                                Error *errp[static 1]);
 
 /**
  * @qemu_chr_parse_common:
@@ -166,7 +166,7 @@ void qemu_chr_set_feature(Chardev *chr,
 QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename);
 int qemu_chr_write(Chardev *s, const uint8_t *buf, int len, bool write_all);
 #define qemu_chr_write_all(s, buf, len) qemu_chr_write(s, buf, len, true)
-int qemu_chr_wait_connected(Chardev *chr, Error **errp);
+int qemu_chr_wait_connected(Chardev *chr, Error *errp[static 1]);
 
 #define TYPE_CHARDEV "chardev"
 #define CHARDEV(obj) OBJECT_CHECK(Chardev, (obj), TYPE_CHARDEV)
@@ -219,11 +219,12 @@ typedef struct ChardevClass {
 } ChardevClass;
 
 Chardev *qemu_chardev_new(const char *id, const char *typename,
-                          ChardevBackend *backend, Error **errp);
+                          ChardevBackend *backend, Error *errp[static 1]);
 
 extern int term_escape_char;
 
 /* console.c */
-void qemu_chr_parse_vc(QemuOpts *opts, ChardevBackend *backend, Error **errp);
+void qemu_chr_parse_vc(QemuOpts *opts, ChardevBackend *backend,
+		       Error *errp[static 1]);
 
 #endif
include/crypto/afsplit.h +2 -2
index 7dd21f0a67..7b1a9c8216 100644
@@ -108,7 +108,7 @@ int qcrypto_afsplit_encode(QCryptoHashAlgorithm hash,
                            uint32_t stripes,
                            const uint8_t *in,
                            uint8_t *out,
-                           Error **errp);
+                           Error *errp[static 1]);
 
 /**
  * qcrypto_afsplit_decode:
@@ -130,6 +130,6 @@ int qcrypto_afsplit_decode(QCryptoHashAlgorithm hash,
                            uint32_t stripes,
                            const uint8_t *in,
                            uint8_t *out,
-                           Error **errp);
+                           Error *errp[static 1]);
 
 #endif /* QCRYPTO_AFSPLIT_H */
include/crypto/block.h +5 -5
index 013a435f1b..5095000e68 100644
@@ -105,7 +105,7 @@ QCryptoBlock *qcrypto_block_open(QCryptoBlockOpenOptions *options,
                                  QCryptoBlockReadFunc readfunc,
                                  void *opaque,
                                  unsigned int flags,
-                                 Error **errp);
+                                 Error *errp[static 1]);
 
 /**
  * qcrypto_block_create:
@@ -136,7 +136,7 @@ QCryptoBlock *qcrypto_block_create(QCryptoBlockCreateOptions *options,
                                    QCryptoBlockInitFunc initfunc,
                                    QCryptoBlockWriteFunc writefunc,
                                    void *opaque,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 
 
 /**
@@ -152,7 +152,7 @@ QCryptoBlock *qcrypto_block_create(QCryptoBlockCreateOptions *options,
  * Returns: a block encryption info object, or NULL on error
  */
 QCryptoBlockInfo *qcrypto_block_get_info(QCryptoBlock *block,
-                                         Error **errp);
+                                         Error *errp[static 1]);
 
 /**
  * @qcrypto_block_decrypt:
@@ -171,7 +171,7 @@ int qcrypto_block_decrypt(QCryptoBlock *block,
                           uint64_t startsector,
                           uint8_t *buf,
                           size_t len,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 /**
  * @qcrypto_block_encrypt:
@@ -190,7 +190,7 @@ int qcrypto_block_encrypt(QCryptoBlock *block,
                           uint64_t startsector,
                           uint8_t *buf,
                           size_t len,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 /**
  * qcrypto_block_get_cipher:
include/crypto/cipher.h +4 -4
index bec9f412b0..e8c80e9032 100644
@@ -158,7 +158,7 @@ size_t qcrypto_cipher_get_iv_len(QCryptoCipherAlgorithm alg,
 QCryptoCipher *qcrypto_cipher_new(QCryptoCipherAlgorithm alg,
                                   QCryptoCipherMode mode,
                                   const uint8_t *key, size_t nkey,
-                                  Error **errp);
+                                  Error *errp[static 1]);
 
 /**
  * qcrypto_cipher_free:
@@ -188,7 +188,7 @@ int qcrypto_cipher_encrypt(QCryptoCipher *cipher,
                            const void *in,
                            void *out,
                            size_t len,
-                           Error **errp);
+                           Error *errp[static 1]);
 
 
 /**
@@ -210,7 +210,7 @@ int qcrypto_cipher_decrypt(QCryptoCipher *cipher,
                            const void *in,
                            void *out,
                            size_t len,
-                           Error **errp);
+                           Error *errp[static 1]);
 
 /**
  * qcrypto_cipher_setiv:
@@ -230,6 +230,6 @@ int qcrypto_cipher_decrypt(QCryptoCipher *cipher,
  */
 int qcrypto_cipher_setiv(QCryptoCipher *cipher,
                          const uint8_t *iv, size_t niv,
-                         Error **errp);
+                         Error *errp[static 1]);
 
 #endif /* QCRYPTO_CIPHER_H */
include/crypto/hash.h +6 -6
index ca3267f3df..7537d6cf96 100644
@@ -70,7 +70,7 @@ int qcrypto_hash_bytesv(QCryptoHashAlgorithm alg,
                         size_t niov,
                         uint8_t **result,
                         size_t *resultlen,
-                        Error **errp);
+                        Error *errp[static 1]);
 
 /**
  * qcrypto_hash_bytes:
@@ -95,7 +95,7 @@ int qcrypto_hash_bytes(QCryptoHashAlgorithm alg,
                        size_t len,
                        uint8_t **result,
                        size_t *resultlen,
-                       Error **errp);
+                       Error *errp[static 1]);
 
 /**
  * qcrypto_hash_digestv:
@@ -118,7 +118,7 @@ int qcrypto_hash_digestv(QCryptoHashAlgorithm alg,
                          const struct iovec *iov,
                          size_t niov,
                          char **digest,
-                         Error **errp);
+                         Error *errp[static 1]);
 
 /**
  * qcrypto_hash_digest:
@@ -141,7 +141,7 @@ int qcrypto_hash_digest(QCryptoHashAlgorithm alg,
                         const char *buf,
                         size_t len,
                         char **digest,
-                        Error **errp);
+                        Error *errp[static 1]);
 
 /**
  * qcrypto_hash_base64v:
@@ -164,7 +164,7 @@ int qcrypto_hash_base64v(QCryptoHashAlgorithm alg,
                          const struct iovec *iov,
                          size_t niov,
                          char **base64,
-                         Error **errp);
+                         Error *errp[static 1]);
 
 /**
  * qcrypto_hash_base64:
@@ -187,6 +187,6 @@ int qcrypto_hash_base64(QCryptoHashAlgorithm alg,
                         const char *buf,
                         size_t len,
                         char **base64,
-                        Error **errp);
+                        Error *errp[static 1]);
 
 #endif /* QCRYPTO_HASH_H */
include/crypto/init.h +1 -1
index 04c1edf770..c731110598 100644
@@ -21,6 +21,6 @@
 #ifndef QCRYPTO_INIT_H
 #define QCRYPTO_INIT_H
 
-int qcrypto_init(Error **errp);
+int qcrypto_init(Error *errp[static 1]);
 
 #endif /* QCRYPTO_INIT_H */
include/crypto/ivgen.h +1 -1
index 0350cd2a93..183807202f 100644
@@ -156,7 +156,7 @@ QCryptoIVGen *qcrypto_ivgen_new(QCryptoIVGenAlgorithm alg,
 int qcrypto_ivgen_calculate(QCryptoIVGen *ivgen,
                             uint64_t sector,
                             uint8_t *iv, size_t niv,
-                            Error **errp);
+                            Error *errp[static 1]);
 
 
 /**
include/crypto/pbkdf.h +2 -2
index ef209b3e03..3b5453367c 100644
@@ -124,7 +124,7 @@ int qcrypto_pbkdf2(QCryptoHashAlgorithm hash,
                    const uint8_t *salt, size_t nsalt,
                    uint64_t iterations,
                    uint8_t *out, size_t nout,
-                   Error **errp);
+                   Error *errp[static 1]);
 
 /**
  * qcrypto_pbkdf2_count_iters:
@@ -151,6 +151,6 @@ uint64_t qcrypto_pbkdf2_count_iters(QCryptoHashAlgorithm hash,
                                     const uint8_t *key, size_t nkey,
                                     const uint8_t *salt, size_t nsalt,
                                     size_t nout,
-                                    Error **errp);
+                                    Error *errp[static 1]);
 
 #endif /* QCRYPTO_PBKDF_H */
include/crypto/random.h +2 -2
index a07229ce96..7c503cc9c6 100644
@@ -38,7 +38,7 @@
  */
 int qcrypto_random_bytes(uint8_t *buf,
                          size_t buflen,
-                         Error **errp);
+                         Error *errp[static 1]);
 
 /**
  * qcrypto_random_init:
@@ -48,6 +48,6 @@ int qcrypto_random_bytes(uint8_t *buf,
  *
  * Returns 0 on success, -1 on error
  */
-int qcrypto_random_init(Error **errp);
+int qcrypto_random_init(Error *errp[static 1]);
 
 #endif /* QCRYPTO_RANDOM_H */
include/crypto/secret.h +3 -3
index 07a963e794..cd497a1ee2 100644
@@ -137,10 +137,10 @@ struct QCryptoSecretClass {
 extern int qcrypto_secret_lookup(const char *secretid,
                                  uint8_t **data,
                                  size_t *datalen,
-                                 Error **errp);
+                                 Error *errp[static 1]);
 extern char *qcrypto_secret_lookup_as_utf8(const char *secretid,
-                                           Error **errp);
+                                           Error *errp[static 1]);
 extern char *qcrypto_secret_lookup_as_base64(const char *secretid,
-                                             Error **errp);
+                                             Error *errp[static 1]);
 
 #endif /* QCRYPTO_SECRET_H */
include/crypto/tlssession.h +3 -3
index 1c7414e4ff..d3135b2442 100644
@@ -173,7 +173,7 @@ void qcrypto_tls_session_free(QCryptoTLSSession *sess);
  * Returns 0 if the credentials validated, -1 on error
  */
 int qcrypto_tls_session_check_credentials(QCryptoTLSSession *sess,
-                                          Error **errp);
+                                          Error *errp[static 1]);
 
 typedef ssize_t (*QCryptoTLSSessionWriteFunc)(const char *buf,
                                               size_t len,
@@ -264,7 +264,7 @@ ssize_t qcrypto_tls_session_read(QCryptoTLSSession *sess,
  * or write again
  */
 int qcrypto_tls_session_handshake(QCryptoTLSSession *sess,
-                                  Error **errp);
+                                  Error *errp[static 1]);
 
 typedef enum {
     QCRYPTO_TLS_HANDSHAKE_COMPLETE,
@@ -300,7 +300,7 @@ qcrypto_tls_session_get_handshake_status(QCryptoTLSSession *sess);
  * or -1 on error
  */
 int qcrypto_tls_session_get_key_size(QCryptoTLSSession *sess,
-                                     Error **errp);
+                                     Error *errp[static 1]);
 
 /**
  * qcrypto_tls_session_get_peer_name:
include/exec/memory.h +6 -6
index 80e605a96a..8bd3a8f1f0 100644
@@ -408,7 +408,7 @@ void memory_region_init_ram(MemoryRegion *mr,
                             struct Object *owner,
                             const char *name,
                             uint64_t size,
-                            Error **errp);
+                            Error *errp[static 1]);
 
 /**
  * memory_region_init_resizeable_ram:  Initialize memory region with resizeable
@@ -434,7 +434,7 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,
                                        void (*resized)(const char*,
                                                        uint64_t length,
                                                        void *host),
-                                       Error **errp);
+                                       Error *errp[static 1]);
 #ifdef __linux__
 /**
  * memory_region_init_ram_from_file:  Initialize RAM memory region with a
@@ -455,7 +455,7 @@ void memory_region_init_ram_from_file(MemoryRegion *mr,
                                       uint64_t size,
                                       bool share,
                                       const char *path,
-                                      Error **errp);
+                                      Error *errp[static 1]);
 #endif
 
 /**
@@ -537,7 +537,7 @@ void memory_region_init_rom(MemoryRegion *mr,
                             struct Object *owner,
                             const char *name,
                             uint64_t size,
-                            Error **errp);
+                            Error *errp[static 1]);
 
 /**
  * memory_region_init_rom_device:  Initialize a ROM memory region.  Writes are
@@ -557,7 +557,7 @@ void memory_region_init_rom_device(MemoryRegion *mr,
                                    void *opaque,
                                    const char *name,
                                    uint64_t size,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 
 /**
  * memory_region_init_reservation: Initialize a memory region that reserves
@@ -859,7 +859,7 @@ void *memory_region_get_ram_ptr(MemoryRegion *mr);
  * @errp: pointer to Error*, to store an error if it happens.
  */
 void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize,
-                              Error **errp);
+                              Error *errp[static 1]);
 
 /**
  * memory_region_set_log: Turn dirty logging on or off for a region.
include/exec/ram_addr.h +7 -5
index 140efa840c..7a3b1721f4 100644
@@ -64,18 +64,20 @@ long qemu_getrampagesize(void);
 unsigned long last_ram_page(void);
 RAMBlock *qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr,
                                    bool share, const char *mem_path,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 RAMBlock *qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
-                                  MemoryRegion *mr, Error **errp);
-RAMBlock *qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr, Error **errp);
+                                  MemoryRegion *mr, Error *errp[static 1]);
+RAMBlock *qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr,
+			 Error *errp[static 1]);
 RAMBlock *qemu_ram_alloc_resizeable(ram_addr_t size, ram_addr_t max_size,
                                     void (*resized)(const char*,
                                                     uint64_t length,
                                                     void *host),
-                                    MemoryRegion *mr, Error **errp);
+                                    MemoryRegion *mr, Error *errp[static 1]);
 void qemu_ram_free(RAMBlock *block);
 
-int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp);
+int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize,
+		    Error *errp[static 1]);
 
 #define DIRTY_CLIENTS_ALL     ((1 << DIRTY_MEMORY_NUM) - 1)
 #define DIRTY_CLIENTS_NOCODE  (DIRTY_CLIENTS_ALL & ~(1 << DIRTY_MEMORY_CODE))
include/hw/acpi/acpi.h +2 -2
index 7b3d93cf0d..dddcf6b21c 100644
@@ -179,8 +179,8 @@ extern size_t acpi_tables_len;
 uint8_t *acpi_table_first(void);
 uint8_t *acpi_table_next(uint8_t *current);
 unsigned acpi_table_len(void *current);
-void acpi_table_add(const QemuOpts *opts, Error **errp);
-void acpi_table_add_builtin(const QemuOpts *opts, Error **errp);
+void acpi_table_add(const QemuOpts *opts, Error *errp[static 1]);
+void acpi_table_add_builtin(const QemuOpts *opts, Error *errp[static 1]);
 
 typedef struct AcpiSlicOem AcpiSlicOem;
 struct AcpiSlicOem {
include/hw/acpi/cpu.h +4 -3
index 89ce172941..20e2187cfc 100644
@@ -35,14 +35,15 @@ typedef struct CPUHotplugState {
 } CPUHotplugState;
 
 void acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
-                      CPUHotplugState *cpu_st, DeviceState *dev, Error **errp);
+                      CPUHotplugState *cpu_st, DeviceState *dev,
+                      Error *errp[static 1]);
 
 void acpi_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
                                 CPUHotplugState *cpu_st,
-                                DeviceState *dev, Error **errp);
+                                DeviceState *dev, Error *errp[static 1]);
 
 void acpi_cpu_unplug_cb(CPUHotplugState *cpu_st,
-                        DeviceState *dev, Error **errp);
+                        DeviceState *dev, Error *errp[static 1]);
 
 void cpu_hotplug_hw_init(MemoryRegion *as, Object *owner,
                          CPUHotplugState *state, hwaddr base_addr);
include/hw/acpi/cpu_hotplug.h +2 -1
index 3b932abbbb..73ccd64c20 100644
@@ -26,7 +26,8 @@ typedef struct AcpiCpuHotplug {
 } AcpiCpuHotplug;
 
 void legacy_acpi_cpu_plug_cb(HotplugHandler *hotplug_dev,
-                             AcpiCpuHotplug *g, DeviceState *dev, Error **errp);
+                             AcpiCpuHotplug *g, DeviceState *dev,
+                             Error *errp[static 1]);
 
 void legacy_acpi_cpu_hotplug_init(MemoryRegion *parent, Object *owner,
                                   AcpiCpuHotplug *gpe_cpu, uint16_t base);
include/hw/acpi/ich9.h +5 -4
index a352c94fde..af5357f702 100644
@@ -70,14 +70,15 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
 void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base);
 extern const VMStateDescription vmstate_ich9_pm;
 
-void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp);
+void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm,
+			    Error *errp[static 1]);
 
 void ich9_pm_device_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
-                            Error **errp);
+                            Error *errp[static 1]);
 void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
-                                      DeviceState *dev, Error **errp);
+                                      DeviceState *dev, Error *errp[static 1]);
 void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
-                              Error **errp);
+                              Error *errp[static 1]);
 
 void ich9_pm_ospm_status(AcpiDeviceIf *adev, ACPIOSTInfoList ***list);
 #endif /* HW_ACPI_ICH9_H */
include/hw/acpi/memory_hotplug.h +3 -3
index 77c65765d6..fe8f64c66f 100644
@@ -32,12 +32,12 @@ void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner,
                               MemHotplugState *state, uint16_t io_base);
 
 void acpi_memory_plug_cb(HotplugHandler *hotplug_dev, MemHotplugState *mem_st,
-                         DeviceState *dev, Error **errp);
+                         DeviceState *dev, Error *errp[static 1]);
 void acpi_memory_unplug_request_cb(HotplugHandler *hotplug_dev,
                                    MemHotplugState *mem_st,
-                                   DeviceState *dev, Error **errp);
+                                   DeviceState *dev, Error *errp[static 1]);
 void acpi_memory_unplug_cb(MemHotplugState *mem_st,
-                           DeviceState *dev, Error **errp);
+                           DeviceState *dev, Error *errp[static 1]);
 
 extern const VMStateDescription vmstate_memory_hotplug;
 #define VMSTATE_MEMORY_HOTPLUG(memhp, state) \
include/hw/acpi/pcihp.h +2 -2
index 8a65f99fc8..7442f8c337 100644
@@ -57,9 +57,9 @@ void acpi_pcihp_init(Object *owner, AcpiPciHpState *, PCIBus *root,
                      MemoryRegion *address_space_io, bool bridges_enabled);
 
 void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
-                               DeviceState *dev, Error **errp);
+                               DeviceState *dev, Error *errp[static 1]);
 void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
-                                 DeviceState *dev, Error **errp);
+                                 DeviceState *dev, Error *errp[static 1]);
 
 /* Called on reset */
 void acpi_pcihp_reset(AcpiPciHpState *s);
include/hw/block/block.h +2 -2
index f3f6e8ef02..0408e96a84 100644
@@ -74,10 +74,10 @@ static inline unsigned int get_physical_block_exp(BlockConf *conf)
 void blkconf_serial(BlockConf *conf, char **serial);
 void blkconf_geometry(BlockConf *conf, int *trans,
                       unsigned cyls_max, unsigned heads_max, unsigned secs_max,
-                      Error **errp);
+                      Error *errp[static 1]);
 void blkconf_blocksizes(BlockConf *conf);
 void blkconf_apply_backend_options(BlockConf *conf, bool readonly,
-                                   bool resizable, Error **errp);
+                                   bool resizable, Error *errp[static 1]);
 
 /* Hard disk geometry */
 
include/hw/boards.h +1 -1
index 76ce0219ff..aa36da926f 100644
@@ -45,7 +45,7 @@ void machine_register_compat_props(MachineState *machine);
 HotpluggableCPUList *machine_query_hotpluggable_cpus(MachineState *machine);
 void machine_set_cpu_numa_node(MachineState *machine,
                                const CpuInstanceProperties *props,
-                               Error **errp);
+                               Error *errp[static 1]);
 
 /**
  * CPUArchId:
include/hw/char/serial.h +1 -1
index c4daf11a14..d3463ca0f8 100644
@@ -82,7 +82,7 @@ struct SerialState {
 extern const VMStateDescription vmstate_serial;
 extern const MemoryRegionOps serial_io_ops;
 
-void serial_realize_core(SerialState *s, Error **errp);
+void serial_realize_core(SerialState *s, Error *errp[static 1]);
 void serial_exit_core(SerialState *s);
 void serial_set_frequency(SerialState *s, uint32_t frequency);
 
include/hw/hotplug.h +4 -4
index 1a0516a479..eb3344e5dd 100644
@@ -72,7 +72,7 @@ typedef struct HotplugHandlerClass {
  */
 void hotplug_handler_plug(HotplugHandler *plug_handler,
                           DeviceState *plugged_dev,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 /**
  * hotplug_handler_pre_plug:
@@ -81,7 +81,7 @@ void hotplug_handler_plug(HotplugHandler *plug_handler,
  */
 void hotplug_handler_pre_plug(HotplugHandler *plug_handler,
                               DeviceState *plugged_dev,
-                              Error **errp);
+                              Error *errp[static 1]);
 
 /**
  * hotplug_handler_unplug_request:
@@ -90,7 +90,7 @@ void hotplug_handler_pre_plug(HotplugHandler *plug_handler,
  */
 void hotplug_handler_unplug_request(HotplugHandler *plug_handler,
                                     DeviceState *plugged_dev,
-                                    Error **errp);
+                                    Error *errp[static 1]);
 /**
  * hotplug_handler_unplug:
  *
@@ -98,5 +98,5 @@ void hotplug_handler_unplug_request(HotplugHandler *plug_handler,
  */
 void hotplug_handler_unplug(HotplugHandler *plug_handler,
                             DeviceState *plugged_dev,
-                            Error **errp);
+                            Error *errp[static 1]);
 #endif
include/hw/i386/pc.h +1 -1
index d071c9c0e9..07344a115e 100644
@@ -239,7 +239,7 @@ void pc_register_ferr_irq(qemu_irq irq);
 void pc_acpi_smi_interrupt(void *opaque, int irq, int level);
 
 void pc_cpus_init(PCMachineState *pcms);
-void pc_hot_add_cpu(const int64_t id, Error **errp);
+void pc_hot_add_cpu(const int64_t id, Error *errp[static 1]);
 void pc_acpi_init(const char *default_dsdt);
 
 void pc_guest_info_init(PCMachineState *pcms);
include/hw/isa/isa.h +1 -1
index 4b8c13532c..af66c5d4a4 100644
@@ -100,7 +100,7 @@ struct ISADevice {
 };
 
 ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space,
-                    MemoryRegion *address_space_io, Error **errp);
+                    MemoryRegion *address_space_io, Error *errp[static 1]);
 void isa_bus_irqs(ISABus *bus, qemu_irq *irqs);
 qemu_irq isa_get_irq(ISADevice *dev, int isairq);
 void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq);
include/hw/loader.h +2 -1
index 490c9ff8e6..ac4d10433f 100644
@@ -129,7 +129,8 @@ int load_elf(const char *filename, uint64_t (*translate_fn)(void *, uint64_t),
  * Inspect an ELF file's header. Read its full header contents into a
  * buffer and/or determine if the ELF is 64bit.
  */
-void load_elf_hdr(const char *filename, void *hdr, bool *is64, Error **errp);
+void load_elf_hdr(const char *filename, void *hdr, bool *is64,
+		  Error *errp[static 1]);
 
 int load_aout(const char *filename, hwaddr addr, int max_sz,
               int bswap_needed, hwaddr target_page_size);
include/hw/mem/pc-dimm.h +6 -4
index 1e483f2670..2a91796c8c 100644
@@ -89,14 +89,16 @@ typedef struct MemoryHotplugState {
 uint64_t pc_dimm_get_free_addr(uint64_t address_space_start,
                                uint64_t address_space_size,
                                uint64_t *hint, uint64_t align, uint64_t size,
-                               Error **errp);
+                               Error *errp[static 1]);
 
-int pc_dimm_get_free_slot(const int *hint, int max_slots, Error **errp);
+int pc_dimm_get_free_slot(const int *hint, int max_slots,
+			  Error *errp[static 1]);
 
 int qmp_pc_dimm_device_list(Object *obj, void *opaque);
-uint64_t pc_existing_dimms_capacity(Error **errp);
+uint64_t pc_existing_dimms_capacity(Error *errp[static 1]);
 void pc_dimm_memory_plug(DeviceState *dev, MemoryHotplugState *hpms,
-                         MemoryRegion *mr, uint64_t align, Error **errp);
+                         MemoryRegion *mr, uint64_t align,
+                         Error *errp[static 1]);
 void pc_dimm_memory_unplug(DeviceState *dev, MemoryHotplugState *hpms,
                            MemoryRegion *mr);
 #endif
include/hw/nmi.h +1 -1
index d092c684a1..472ef9f2e1 100644
@@ -44,6 +44,6 @@ typedef struct NMIClass {
     void (*nmi_monitor_handler)(NMIState *n, int cpu_index, Error **errp);
 } NMIClass;
 
-void nmi_monitor_handle(int cpu_index, Error **errp);
+void nmi_monitor_handle(int cpu_index, Error *errp[static 1]);
 
 #endif /* NMI_H */
include/hw/pci/msi.h +1 -1
index 4837bcf490..dd84819016 100644
@@ -36,7 +36,7 @@ MSIMessage msi_get_message(PCIDevice *dev, unsigned int vector);
 bool msi_enabled(const PCIDevice *dev);
 int msi_init(struct PCIDevice *dev, uint8_t offset,
              unsigned int nr_vectors, bool msi64bit,
-             bool msi_per_vector_mask, Error **errp);
+             bool msi_per_vector_mask, Error *errp[static 1]);
 void msi_uninit(struct PCIDevice *dev);
 void msi_reset(PCIDevice *dev);
 void msi_notify(PCIDevice *dev, unsigned int vector);
include/hw/pci/msix.h +2 -2
index 1f27658d35..76f3cf27a4 100644
@@ -10,9 +10,9 @@ int msix_init(PCIDevice *dev, unsigned short nentries,
               MemoryRegion *table_bar, uint8_t table_bar_nr,
               unsigned table_offset, MemoryRegion *pba_bar,
               uint8_t pba_bar_nr, unsigned pba_offset, uint8_t cap_pos,
-              Error **errp);
+              Error *errp[static 1]);
 int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
-                            uint8_t bar_nr, Error **errp);
+                            uint8_t bar_nr, Error *errp[static 1]);
 
 void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len);
 
include/hw/pci/pci.h +1 -1
index a37a2d5cb6..bffb8a6bbb 100644
@@ -359,7 +359,7 @@ int pci_add_capability(PCIDevice *pdev, uint8_t cap_id,
                        uint8_t offset, uint8_t size);
 int pci_add_capability2(PCIDevice *pdev, uint8_t cap_id,
                        uint8_t offset, uint8_t size,
-                       Error **errp);
+                       Error *errp[static 1]);
 
 void pci_del_capability(PCIDevice *pci_dev, uint8_t cap_id, uint8_t cap_size);
 
include/hw/pci/pcie.h +3 -2
index 3d8f24b007..08c33a1ff5 100644
@@ -131,7 +131,8 @@ void pcie_dev_ser_num_init(PCIDevice *dev, uint16_t offset, uint64_t ser_num);
 void pcie_ats_init(PCIDevice *dev, uint16_t offset);
 
 void pcie_cap_slot_hotplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
-                              Error **errp);
+                              Error *errp[static 1]);
 void pcie_cap_slot_hot_unplug_request_cb(HotplugHandler *hotplug_dev,
-                                         DeviceState *dev, Error **errp);
+                                         DeviceState *dev,
+                                         Error *errp[static 1]);
 #endif /* QEMU_PCIE_H */
include/hw/pci/pcie_aer.h +1 -1
index 729a9439c8..084a11f99e 100644
@@ -87,7 +87,7 @@ struct PCIEAERErr {
 extern const VMStateDescription vmstate_pcie_aer_log;
 
 int pcie_aer_init(PCIDevice *dev, uint8_t cap_ver, uint16_t offset,
-                  uint16_t size, Error **errp);
+                  uint16_t size, Error *errp[static 1]);
 void pcie_aer_exit(PCIDevice *dev);
 void pcie_aer_write_config(PCIDevice *dev,
                            uint32_t addr, uint32_t val, int len);
include/hw/pci/shpc.h +3 -2
index 71e836b1c0..fc18466e39 100644
@@ -45,9 +45,10 @@ void shpc_cap_write_config(PCIDevice *d, uint32_t addr, uint32_t val, int len);
 
 
 void shpc_device_hotplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
-                            Error **errp);
+                            Error *errp[static 1]);
 void shpc_device_hot_unplug_request_cb(HotplugHandler *hotplug_dev,
-                                       DeviceState *dev, Error **errp);
+                                       DeviceState *dev,
+                                       Error *errp[static 1]);
 
 extern VMStateInfo shpc_vmstate_info;
 #define SHPC_VMSTATE(_field, _type,  _test) \
include/hw/ppc/pnv_xscom.h +1 -1
index 3757b2cab9..41ba14e0cc 100644
@@ -66,7 +66,7 @@ typedef struct PnvXScomInterfaceClass {
 #define PNV_XSCOM_OCC_BASE        0x0066000
 #define PNV_XSCOM_OCC_SIZE        0x6000
 
-extern void pnv_xscom_realize(PnvChip *chip, Error **errp);
+extern void pnv_xscom_realize(PnvChip *chip, Error *errp[static 1]);
 extern int pnv_xscom_populate(PnvChip *chip, void *fdt, int offset);
 
 extern void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset,
include/hw/ppc/xics.h +4 -3
index a3073f9053..2804fbfc97 100644
@@ -174,9 +174,10 @@ typedef struct XICSFabricClass {
 
 #define XICS_IRQS_SPAPR               1024
 
-int spapr_ics_alloc(ICSState *ics, int irq_hint, bool lsi, Error **errp);
+int spapr_ics_alloc(ICSState *ics, int irq_hint, bool lsi,
+		    Error *errp[static 1]);
 int spapr_ics_alloc_block(ICSState *ics, int num, bool lsi, bool align,
-                           Error **errp);
+                           Error *errp[static 1]);
 void spapr_ics_free(ICSState *ics, int irq, int num);
 void spapr_dt_xics(int nr_servers, void *fdt, uint32_t phandle);
 
@@ -204,7 +205,7 @@ void icp_resend(ICPState *ss);
 
 typedef struct sPAPRMachineState sPAPRMachineState;
 
-int xics_kvm_init(sPAPRMachineState *spapr, Error **errp);
+int xics_kvm_init(sPAPRMachineState *spapr, Error *errp[static 1]);
 void xics_spapr_init(sPAPRMachineState *spapr);
 
 #endif /* XICS_H */
include/hw/qdev-core.h +4 -4
index e69489ec6c..5cca0b95e0 100644
@@ -271,9 +271,9 @@ void qdev_init_nofail(DeviceState *dev);
 void qdev_set_legacy_instance_id(DeviceState *dev, int alias_id,
                                  int required_for_version);
 HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev);
-void qdev_unplug(DeviceState *dev, Error **errp);
+void qdev_unplug(DeviceState *dev, Error *errp[static 1]);
 void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev,
-                                  DeviceState *dev, Error **errp);
+                                  DeviceState *dev, Error *errp[static 1]);
 void qdev_machine_creation_done(void);
 bool qdev_machine_modified(void);
 
@@ -382,9 +382,9 @@ char *qdev_get_dev_path(DeviceState *dev);
 GSList *qdev_build_hotpluggable_device_list(Object *peripheral);
 
 void qbus_set_hotplug_handler(BusState *bus, DeviceState *handler,
-                              Error **errp);
+                              Error *errp[static 1]);
 
-void qbus_set_bus_hotplug_handler(BusState *bus, Error **errp);
+void qbus_set_bus_hotplug_handler(BusState *bus, Error *errp[static 1]);
 
 static inline bool qbus_is_hotpluggable(BusState *bus)
 {
include/hw/qdev-properties.h +6 -4
index d206fc93dd..b1b569e662 100644
@@ -187,7 +187,7 @@ void qdev_prop_set_string(DeviceState *dev, const char *name, const char *value)
 void qdev_prop_set_chr(DeviceState *dev, const char *name, Chardev *value);
 void qdev_prop_set_netdev(DeviceState *dev, const char *name, NetClientState *value);
 void qdev_prop_set_drive(DeviceState *dev, const char *name,
-                         BlockBackend *value, Error **errp);
+                         BlockBackend *value, Error *errp[static 1]);
 void qdev_prop_set_macaddr(DeviceState *dev, const char *name,
                            const uint8_t *value);
 void qdev_prop_set_enum(DeviceState *dev, const char *name, int value);
@@ -211,7 +211,8 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
  * On error, store error in @errp.  Static properties access data in a struct.
  * The type of the QOM property is derived from prop->info.
  */
-void qdev_property_add_static(DeviceState *dev, Property *prop, Error **errp);
+void qdev_property_add_static(DeviceState *dev, Property *prop,
+			      Error *errp[static 1]);
 
 void qdev_alias_all_properties(DeviceState *target, Object *source);
 
@@ -226,7 +227,7 @@ void qdev_alias_all_properties(DeviceState *target, Object *source);
  * a friendly format identifying both the device and the property.
  */
 void qdev_prop_set_after_realize(DeviceState *dev, const char *name,
-                                 Error **errp);
+                                 Error *errp[static 1]);
 
 /**
  * qdev_prop_allow_set_link_before_realize:
@@ -236,6 +237,7 @@ void qdev_prop_set_after_realize(DeviceState *dev, const char *name,
  * object_property_add_link().
  */
 void qdev_prop_allow_set_link_before_realize(Object *obj, const char *name,
-                                             Object *val, Error **errp);
+                                             Object *val,
+                                             Error *errp[static 1]);
 
 #endif
include/hw/s390x/css.h +2 -2
index 596a2f2ef3..3d5dc0edc9 100644
@@ -161,7 +161,7 @@ typedef enum {
 
 uint32_t css_get_adapter_id(CssIoAdapterType type, uint8_t isc);
 void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maskable,
-                              Error **errp);
+                              Error *errp[static 1]);
 
 #ifndef CONFIG_USER_ONLY
 SubchDev *css_find_subch(uint8_t m, uint8_t cssid, uint8_t ssid,
@@ -218,5 +218,5 @@ extern PropertyInfo css_devid_ro_propinfo;
  * is responsible for unregistering and freeing it.
  */
 SubchDev *css_create_sch(CssDevId bus_id, bool is_virtual, bool squash_mcss,
-                         Error **errp);
+                         Error *errp[static 1]);
 #endif
include/hw/scsi/scsi.h +2 -1
index 6b85786dbf..3d04dbba67 100644
@@ -176,7 +176,8 @@ static inline SCSIBus *scsi_bus_from_device(SCSIDevice *d)
 
 SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockBackend *blk,
                                       int unit, bool removable, int bootindex,
-                                      const char *serial, Error **errp);
+                                      const char *serial,
+                                      Error *errp[static 1]);
 void scsi_bus_legacy_handle_cmdline(SCSIBus *bus, bool deprecated);
 void scsi_legacy_handle_cmdline(void);
 
include/hw/smbios/smbios.h +1 -1
index 31e8d5f47e..e3a08a09f1 100644
@@ -257,7 +257,7 @@ struct smbios_type_127 {
     struct smbios_structure_header header;
 } QEMU_PACKED;
 
-void smbios_entry_add(QemuOpts *opts, Error **errp);
+void smbios_entry_add(QemuOpts *opts, Error *errp[static 1]);
 void smbios_set_cpuid(uint32_t version, uint32_t features);
 void smbios_set_defaults(const char *manufacturer, const char *product,
                          const char *version, bool legacy_mode,
include/hw/usb.h +4 -4
index eb28655270..9a95e1d147 100644
@@ -542,15 +542,15 @@ void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index,
 void usb_register_companion(const char *masterbus, USBPort *ports[],
                             uint32_t portcount, uint32_t firstport,
                             void *opaque, USBPortOps *ops, int speedmask,
-                            Error **errp);
+                            Error *errp[static 1]);
 void usb_port_location(USBPort *downstream, USBPort *upstream, int portnr);
 void usb_unregister_port(USBBus *bus, USBPort *port);
-void usb_claim_port(USBDevice *dev, Error **errp);
+void usb_claim_port(USBDevice *dev, Error *errp[static 1]);
 void usb_release_port(USBDevice *dev);
-void usb_device_attach(USBDevice *dev, Error **errp);
+void usb_device_attach(USBDevice *dev, Error *errp[static 1]);
 int usb_device_detach(USBDevice *dev);
 int usb_device_delete_addr(int busnr, int addr);
-void usb_check_attach(USBDevice *dev, Error **errp);
+void usb_check_attach(USBDevice *dev, Error *errp[static 1]);
 
 static inline USBBus *usb_bus_from_device(USBDevice *d)
 {
include/hw/vfio/vfio-common.h +3 -2
index 9521013d52..3404659297 100644
@@ -156,10 +156,11 @@ void vfio_region_mmaps_set_enabled(VFIORegion *region, bool enabled);
 void vfio_region_exit(VFIORegion *region);
 void vfio_region_finalize(VFIORegion *region);
 void vfio_reset_handler(void *opaque);
-VFIOGroup *vfio_get_group(int groupid, AddressSpace *as, Error **errp);
+VFIOGroup *vfio_get_group(int groupid, AddressSpace *as,
+			  Error *errp[static 1]);
 void vfio_put_group(VFIOGroup *group);
 int vfio_get_device(VFIOGroup *group, const char *name,
-                    VFIODevice *vbasedev, Error **errp);
+                    VFIODevice *vbasedev, Error *errp[static 1]);
 
 extern const MemoryRegionOps vfio_region_ops;
 extern QLIST_HEAD(vfio_group_head, VFIOGroup) vfio_group_list;
include/hw/virtio/vhost-scsi-common.h +1 -1
index 4553be4bc3..ed74797e1d 100644
@@ -43,6 +43,6 @@ char *vhost_scsi_common_get_fw_dev_path(FWPathProvider *p, BusState *bus,
                                         DeviceState *dev);
 void vhost_scsi_common_set_config(VirtIODevice *vdev, const uint8_t *config);
 uint64_t vhost_scsi_common_get_features(VirtIODevice *vdev, uint64_t features,
-                                        Error **errp);
+                                        Error *errp[static 1]);
 
 #endif /* VHOST_SCSI_COMMON_H */
include/hw/virtio/virtio-bus.h +1 -1
index a63c1d216d..7f0f5e92c1 100644
@@ -110,7 +110,7 @@ struct VirtioBusState {
     int ioeventfd_grabbed;
 };
 
-void virtio_bus_device_plugged(VirtIODevice *vdev, Error **errp);
+void virtio_bus_device_plugged(VirtIODevice *vdev, Error *errp[static 1]);
 void virtio_bus_reset(VirtioBusState *bus);
 void virtio_bus_device_unplugged(VirtIODevice *bus);
 /* Get the device id of the plugged device. */
include/hw/virtio/virtio-scsi.h +3 -3
index eac2013ddd..bdd037f8be 100644
@@ -141,9 +141,9 @@ void virtio_scsi_common_realize(DeviceState *dev,
                                 VirtIOHandleOutput ctrl,
                                 VirtIOHandleOutput evt,
                                 VirtIOHandleOutput cmd,
-                                Error **errp);
+                                Error *errp[static 1]);
 
-void virtio_scsi_common_unrealize(DeviceState *dev, Error **errp);
+void virtio_scsi_common_unrealize(DeviceState *dev, Error *errp[static 1]);
 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);
@@ -152,7 +152,7 @@ void virtio_scsi_free_req(VirtIOSCSIReq *req);
 void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev,
                             uint32_t event, uint32_t reason);
 
-void virtio_scsi_dataplane_setup(VirtIOSCSI *s, Error **errp);
+void virtio_scsi_dataplane_setup(VirtIOSCSI *s, Error *errp[static 1]);
 int virtio_scsi_dataplane_start(VirtIODevice *s);
 void virtio_scsi_dataplane_stop(VirtIODevice *s);
 
include/hw/xen/xen.h +1 -1
index 7efcdaa8fe..5d2d1e5824 100644
@@ -43,7 +43,7 @@ void xenstore_store_pv_console_info(int i, struct Chardev *chr);
 void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory);
 
 void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
-                   struct MemoryRegion *mr, Error **errp);
+                   struct MemoryRegion *mr, Error *errp[static 1]);
 void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length);
 
 void xen_register_framebuffer(struct MemoryRegion *mr);
include/io/channel-command.h +1 -1
index 336d47fa5c..56ddbe5901 100644
@@ -85,7 +85,7 @@ qio_channel_command_new_pid(int writefd,
 QIOChannelCommand *
 qio_channel_command_new_spawn(const char *const argv[],
                               int flags,
-                              Error **errp);
+                              Error *errp[static 1]);
 
 
 #endif /* QIO_CHANNEL_COMMAND_H */
include/io/channel-file.h +1 -1
index 79245f1183..f7e6078c4a 100644
@@ -88,6 +88,6 @@ QIOChannelFile *
 qio_channel_file_new_path(const char *path,
                           int flags,
                           mode_t mode,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 #endif /* QIO_CHANNEL_FILE_H */
include/io/channel-socket.h +7 -7
index 53801f6042..95b3028854 100644
@@ -76,7 +76,7 @@ qio_channel_socket_new(void);
  */
 QIOChannelSocket *
 qio_channel_socket_new_fd(int fd,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 
 /**
@@ -92,7 +92,7 @@ qio_channel_socket_new_fd(int fd,
  */
 int qio_channel_socket_connect_sync(QIOChannelSocket *ioc,
                                     SocketAddress *addr,
-                                    Error **errp);
+                                    Error *errp[static 1]);
 
 /**
  * qio_channel_socket_connect_async:
@@ -129,7 +129,7 @@ void qio_channel_socket_connect_async(QIOChannelSocket *ioc,
  */
 int qio_channel_socket_listen_sync(QIOChannelSocket *ioc,
                                    SocketAddress *addr,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 
 /**
  * qio_channel_socket_listen_async:
@@ -169,7 +169,7 @@ void qio_channel_socket_listen_async(QIOChannelSocket *ioc,
 int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc,
                                   SocketAddress *localAddr,
                                   SocketAddress *remoteAddr,
-                                  Error **errp);
+                                  Error *errp[static 1]);
 
 /**
  * qio_channel_socket_dgram_async:
@@ -212,7 +212,7 @@ void qio_channel_socket_dgram_async(QIOChannelSocket *ioc,
  */
 SocketAddress *
 qio_channel_socket_get_local_address(QIOChannelSocket *ioc,
-                                     Error **errp);
+                                     Error *errp[static 1]);
 
 /**
  * qio_channel_socket_get_remote_address:
@@ -229,7 +229,7 @@ qio_channel_socket_get_local_address(QIOChannelSocket *ioc,
  */
 SocketAddress *
 qio_channel_socket_get_remote_address(QIOChannelSocket *ioc,
-                                      Error **errp);
+                                      Error *errp[static 1]);
 
 
 /**
@@ -245,7 +245,7 @@ qio_channel_socket_get_remote_address(QIOChannelSocket *ioc,
  */
 QIOChannelSocket *
 qio_channel_socket_accept(QIOChannelSocket *ioc,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 
 #endif /* QIO_CHANNEL_SOCKET_H */
include/io/channel-tls.h +2 -2
index d157eb10e8..e086062ae7 100644
@@ -78,7 +78,7 @@ QIOChannelTLS *
 qio_channel_tls_new_server(QIOChannel *master,
                            QCryptoTLSCreds *creds,
                            const char *aclname,
-                           Error **errp);
+                           Error *errp[static 1]);
 
 /**
  * qio_channel_tls_new_client:
@@ -108,7 +108,7 @@ QIOChannelTLS *
 qio_channel_tls_new_client(QIOChannel *master,
                            QCryptoTLSCreds *creds,
                            const char *hostname,
-                           Error **errp);
+                           Error *errp[static 1]);
 
 /**
  * qio_channel_tls_handshake:
include/io/channel-util.h +1 -1
index c0b79cf603..56a7b99c1f 100644
@@ -47,6 +47,6 @@
  * Returns: the channel object, or NULL on error
  */
 QIOChannel *qio_channel_new_fd(int fd,
-                               Error **errp);
+                               Error *errp[static 1]);
 
 #endif /* QIO_CHANNEL_UTIL_H */
include/io/channel.h +10 -10
index db9bb022a1..695ec994b7 100644
@@ -224,7 +224,7 @@ ssize_t qio_channel_readv_full(QIOChannel *ioc,
                                size_t niov,
                                int **fds,
                                size_t *nfds,
-                               Error **errp);
+                               Error *errp[static 1]);
 
 
 /**
@@ -266,7 +266,7 @@ ssize_t qio_channel_writev_full(QIOChannel *ioc,
                                 size_t niov,
                                 int *fds,
                                 size_t nfds,
-                                Error **errp);
+                                Error *errp[static 1]);
 
 /**
  * qio_channel_readv:
@@ -281,7 +281,7 @@ ssize_t qio_channel_writev_full(QIOChannel *ioc,
 ssize_t qio_channel_readv(QIOChannel *ioc,
                           const struct iovec *iov,
                           size_t niov,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 /**
  * qio_channel_writev:
@@ -296,7 +296,7 @@ ssize_t qio_channel_readv(QIOChannel *ioc,
 ssize_t qio_channel_writev(QIOChannel *ioc,
                            const struct iovec *iov,
                            size_t niov,
-                           Error **errp);
+                           Error *errp[static 1]);
 
 /**
  * qio_channel_readv:
@@ -312,7 +312,7 @@ ssize_t qio_channel_writev(QIOChannel *ioc,
 ssize_t qio_channel_read(QIOChannel *ioc,
                          char *buf,
                          size_t buflen,
-                         Error **errp);
+                         Error *errp[static 1]);
 
 /**
  * qio_channel_write:
@@ -328,7 +328,7 @@ ssize_t qio_channel_read(QIOChannel *ioc,
 ssize_t qio_channel_write(QIOChannel *ioc,
                           const char *buf,
                           size_t buflen,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 /**
  * qio_channel_set_blocking:
@@ -345,7 +345,7 @@ ssize_t qio_channel_write(QIOChannel *ioc,
  */
 int qio_channel_set_blocking(QIOChannel *ioc,
                              bool enabled,
-                             Error **errp);
+                             Error *errp[static 1]);
 
 /**
  * qio_channel_close:
@@ -357,7 +357,7 @@ int qio_channel_set_blocking(QIOChannel *ioc,
  * Returns: 0 on success, -1 on error
  */
 int qio_channel_close(QIOChannel *ioc,
-                      Error **errp);
+                      Error *errp[static 1]);
 
 /**
  * qio_channel_shutdown:
@@ -378,7 +378,7 @@ int qio_channel_close(QIOChannel *ioc,
  */
 int qio_channel_shutdown(QIOChannel *ioc,
                          QIOChannelShutdown how,
-                         Error **errp);
+                         Error *errp[static 1]);
 
 /**
  * qio_channel_set_delay:
@@ -457,7 +457,7 @@ void qio_channel_set_cork(QIOChannel *ioc,
 off_t qio_channel_io_seek(QIOChannel *ioc,
                           off_t offset,
                           int whence,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 
 /**
include/io/dns-resolver.h +1 -1
index 2f69c08c13..71de4450c0 100644
@@ -180,7 +180,7 @@ int qio_dns_resolver_lookup_sync(QIODNSResolver *resolver,
                                  SocketAddress *addr,
                                  size_t *naddrs,
                                  SocketAddress ***addrs,
-                                 Error **errp);
+                                 Error *errp[static 1]);
 
 /**
  * qio_dns_resolver_lookup_async:
include/io/task.h +1 -1
index 6021f51336..d373340557 100644
@@ -276,7 +276,7 @@ void qio_task_set_error(QIOTask *task,
  * Returns: true if an error was propagated, false otherwise
  */
 bool qio_task_propagate_error(QIOTask *task,
-                              Error **errp);
+                              Error *errp[static 1]);
 
 
 /**
include/migration/blocker.h +1 -1
index acd27018e9..5b8be4e0af 100644
@@ -23,7 +23,7 @@
  *
  * @returns - 0 on success, -EBUSY/-EACCES on failure, with errp set.
  */
-int migrate_add_blocker(Error *reason, Error **errp);
+int migrate_add_blocker(Error *reason, Error *errp[static 1]);
 
 /**
  * @migrate_del_blocker - remove a blocking error from migration
include/migration/failover.h +1 -1
index ad91ef2381..6bc59e2c77 100644
@@ -20,7 +20,7 @@ void failover_init_state(void);
 FailoverStatus failover_set_state(FailoverStatus old_state,
                                      FailoverStatus new_state);
 FailoverStatus failover_get_state(void);
-void failover_request_active(Error **errp);
+void failover_request_active(Error *errp[static 1]);
 bool failover_request_is_active(void);
 
 #endif
include/migration/migration.h +2 -2
index 79b5484d65..5cdd9b6cf9 100644
@@ -149,7 +149,7 @@ void migrate_set_state(int *state, int old_state, int new_state);
 
 void migration_fd_process_incoming(QEMUFile *f);
 
-void qemu_start_incoming_migration(const char *uri, Error **errp);
+void qemu_start_incoming_migration(const char *uri, Error *errp[static 1]);
 
 uint64_t migrate_max_downtime(void);
 
@@ -160,7 +160,7 @@ void migrate_fd_connect(MigrationState *s);
 void add_migration_state_change_notifier(Notifier *notify);
 void remove_migration_state_change_notifier(Notifier *notify);
 MigrationState *migrate_init(void);
-bool migration_is_blocked(Error **errp);
+bool migration_is_blocked(Error *errp[static 1]);
 bool migration_in_setup(MigrationState *);
 bool migration_is_idle(void);
 bool migration_has_finished(MigrationState *);
include/migration/snapshot.h +2 -2
index c85b6ec75b..48f6bd3b10 100644
@@ -15,7 +15,7 @@
 #ifndef QEMU_MIGRATION_SNAPSHOT_H
 #define QEMU_MIGRATION_SNAPSHOT_H
 
-int save_snapshot(const char *name, Error **errp);
-int load_snapshot(const char *name, Error **errp);
+int save_snapshot(const char *name, Error *errp[static 1]);
+int load_snapshot(const char *name, Error *errp[static 1]);
 
 #endif
include/migration/vmstate.h +1 -1
index 13fb10797a..8be9416bf8 100644
@@ -1025,7 +1025,7 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
                                    const VMStateDescription *vmsd,
                                    void *base, int alias_id,
                                    int required_for_version,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 
 /* Returns: 0 on success, -1 on failure */
 static inline int vmstate_register(DeviceState *dev, int instance_id,
include/monitor/monitor.h +3 -3
index d2b3aafdb4..35b2b7e818 100644
@@ -30,8 +30,8 @@ int monitor_read_block_device_key(Monitor *mon, const char *device,
                                   BlockCompletionFunc *completion_cb,
                                   void *opaque);
 
-int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp);
-int monitor_fd_param(Monitor *mon, const char *fdname, Error **errp);
+int monitor_get_fd(Monitor *mon, const char *fdname, Error *errp[static 1]);
+int monitor_fd_param(Monitor *mon, const char *fdname, Error *errp[static 1]);
 
 void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
     GCC_FMT_ATTR(2, 0);
@@ -47,7 +47,7 @@ int monitor_read_password(Monitor *mon, ReadLineFunc *readline_func,
 
 AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id,
                                 bool has_opaque, const char *opaque,
-                                Error **errp);
+                                Error *errp[static 1]);
 int monitor_fdset_get_fd(int64_t fdset_id, int flags);
 int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd);
 void monitor_fdset_dup_fd_remove(int dup_fd);
include/monitor/qdev.h +2 -2
index 0ff3331284..437724dc98 100644
@@ -8,10 +8,10 @@
 void hmp_info_qtree(Monitor *mon, const QDict *qdict);
 void hmp_info_qdm(Monitor *mon, const QDict *qdict);
 void hmp_info_qom_tree(Monitor *mon, const QDict *dict);
-void qmp_device_add(QDict *qdict, QObject **ret_data, Error **errp);
+void qmp_device_add(QDict *qdict, QObject **ret_data, Error *errp[static 1]);
 
 int qdev_device_help(QemuOpts *opts);
-DeviceState *qdev_device_add(QemuOpts *opts, Error **errp);
+DeviceState *qdev_device_add(QemuOpts *opts, Error *errp[static 1]);
 void qdev_set_id(DeviceState *dev, const char *id);
 
 #endif
include/net/net.h +3 -3
index 99b28d5b38..5aec9d2494 100644
@@ -201,15 +201,15 @@ extern const char *host_net_devices[];
 extern const char *legacy_tftp_prefix;
 extern const char *legacy_bootp_filename;
 
-int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp);
+int net_client_init(QemuOpts *opts, bool is_netdev, Error *errp[static 1]);
 int net_client_parse(QemuOptsList *opts_list, const char *str);
 int net_init_clients(void);
 void net_check_clients(void);
 void net_cleanup(void);
 void hmp_host_net_add(Monitor *mon, const QDict *qdict);
 void hmp_host_net_remove(Monitor *mon, const QDict *qdict);
-void netdev_add(QemuOpts *opts, Error **errp);
-void qmp_netdev_add(QDict *qdict, QObject **ret, Error **errp);
+void netdev_add(QemuOpts *opts, Error *errp[static 1]);
+void qmp_netdev_add(QDict *qdict, QObject **ret, Error *errp[static 1]);
 
 int net_hub_id_for_client(NetClientState *nc, int *id);
 NetClientState *net_hub_port_find(int hub_id);
include/qapi/error.h +1 -1
index d1378396dd..449b09a741 100644
@@ -283,7 +283,7 @@ void error_free(Error *err);
 /*
  * Convenience function to assert that *@errp is set, then silently free it.
  */
-void error_free_or_abort(Error **errp);
+void error_free_or_abort(Error *errp[static 1]);
 
 /*
  * Convenience function to error_report() and free @err.
include/qapi/qmp/json-parser.h +2 -1
index 9987f8ca85..f926331eb2 100644
@@ -18,6 +18,7 @@
 #include "qapi/qmp/qlist.h"
 
 QObject *json_parser_parse(GQueue *tokens, va_list *ap);
-QObject *json_parser_parse_err(GQueue *tokens, va_list *ap, Error **errp);
+QObject *json_parser_parse_err(GQueue *tokens, va_list *ap,
+			       Error *errp[static 1]);
 
 #endif
include/qapi/qmp/qdict.h +1 -1
index 188440a6a8..4283f1f572 100644
@@ -81,7 +81,7 @@ void qdict_flatten(QDict *qdict);
 void qdict_extract_subqdict(QDict *src, QDict **dst, const char *start);
 void qdict_array_split(QDict *src, QList **dst);
 int qdict_array_entries(QDict *src, const char *subqdict);
-QObject *qdict_crumple(const QDict *src, Error **errp);
+QObject *qdict_crumple(const QDict *src, Error *errp[static 1]);
 
 void qdict_join(QDict *dest, QDict *src, bool overwrite);
 
include/qapi/qmp/qjson.h +3 -2
index 6e84082d5f..24ae99bd9e 100644
@@ -17,9 +17,10 @@
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qstring.h"
 
-QObject *qobject_from_json(const char *string, Error **errp);
+QObject *qobject_from_json(const char *string, Error *errp[static 1]);
 QObject *qobject_from_jsonf(const char *string, ...) GCC_FMT_ATTR(1, 2);
-QObject *qobject_from_jsonv(const char *string, va_list *ap, Error **errp)
+QObject *qobject_from_jsonv(const char *string, va_list *ap,
+			    Error *errp[static 1])
     GCC_FMT_ATTR(1, 0);
 
 QString *qobject_to_json(const QObject *obj);
include/qapi/qobject-input-visitor.h +1 -1
index b399285c43..756e0678c0 100644
@@ -78,6 +78,6 @@ Visitor *qobject_input_visitor_new_keyval(QObject *obj);
  */
 Visitor *qobject_input_visitor_new_str(const char *str,
                                        const char *implied_key,
-                                       Error **errp);
+                                       Error *errp[static 1]);
 
 #endif
include/qapi/util.h +1 -1
index 7436ed815c..ab18c690af 100644
@@ -12,7 +12,7 @@
 #define QAPI_UTIL_H
 
 int qapi_enum_parse(const char * const lookup[], const char *buf,
-                    int max, int def, Error **errp);
+                    int max, int def, Error *errp[static 1]);
 
 int parse_qapi_name(const char *name, bool complete);
 
include/qemu/base64.h +1 -1
index 815d85267d..6c990a4433 100644
@@ -52,7 +52,7 @@
 uint8_t *qbase64_decode(const char *input,
                         size_t in_len,
                         size_t *out_len,
-                        Error **errp);
+                        Error *errp[static 1]);
 
 
 #endif /* QEMU_BASE64_H */
include/qemu/config-file.h +2 -2
index c80d5c8a33..531c184218 100644
@@ -5,7 +5,7 @@
 #include "qapi/qmp/qdict.h"
 
 QemuOptsList *qemu_find_opts(const char *group);
-QemuOptsList *qemu_find_opts_err(const char *group, Error **errp);
+QemuOptsList *qemu_find_opts_err(const char *group, Error *errp[static 1]);
 QemuOpts *qemu_find_opts_singleton(const char *group);
 
 void qemu_add_opts(QemuOptsList *list);
@@ -21,6 +21,6 @@ int qemu_read_config_file(const char *filename);
 /* Parse QDict options as a replacement for a config file (allowing multiple
    enumerated (0..(n-1)) configuration "sections") */
 void qemu_config_parse_qdict(QDict *options, QemuOptsList **lists,
-                             Error **errp);
+                             Error *errp[static 1]);
 
 #endif /* QEMU_CONFIG_FILE_H */
include/qemu/log.h +2 -2
index a50e994c21..787c53043c 100644
@@ -123,8 +123,8 @@ extern const QEMULogItem qemu_log_items[];
 
 void qemu_set_log(int log_flags);
 void qemu_log_needs_buffers(void);
-void qemu_set_log_filename(const char *filename, Error **errp);
-void qemu_set_dfilter_ranges(const char *ranges, Error **errp);
+void qemu_set_log_filename(const char *filename, Error *errp[static 1]);
+void qemu_set_dfilter_ranges(const char *ranges, Error *errp[static 1]);
 bool qemu_log_in_addr_range(uint64_t addr);
 int qemu_str_to_log_mask(const char *str);
 
include/qemu/main-loop.h +1 -1
index d7e24af78d..1711896dd5 100644
@@ -42,7 +42,7 @@
  *
  * In the case of QEMU tools, this will also start/initialize timers.
  */
-int qemu_init_main_loop(Error **errp);
+int qemu_init_main_loop(Error *errp[static 1]);
 
 /**
  * main_loop_wait: Run one iteration of the main loop.
include/qemu/option.h +16 -14
index f7338dbe80..b5b149866d 100644
@@ -38,7 +38,7 @@ int get_param_value(char *buf, int buf_size,
 
 
 void parse_option_size(const char *name, const char *value,
-                       uint64_t *ret, Error **errp);
+                       uint64_t *ret, Error *errp[static 1]);
 bool has_help_option(const char *param);
 bool is_valid_option_list(const char *param);
 
@@ -89,16 +89,16 @@ uint64_t qemu_opt_get_size_del(QemuOpts *opts, const char *name,
                                uint64_t defval);
 int qemu_opt_unset(QemuOpts *opts, const char *name);
 void qemu_opt_set(QemuOpts *opts, const char *name, const char *value,
-                  Error **errp);
+                  Error *errp[static 1]);
 void qemu_opt_set_bool(QemuOpts *opts, const char *name, bool val,
-                       Error **errp);
+                       Error *errp[static 1]);
 void qemu_opt_set_number(QemuOpts *opts, const char *name, int64_t val,
-                         Error **errp);
+                         Error *errp[static 1]);
 typedef int (*qemu_opt_loopfunc)(void *opaque,
                                  const char *name, const char *value,
                                  Error **errp);
 int qemu_opt_foreach(QemuOpts *opts, qemu_opt_loopfunc func, void *opaque,
-                     Error **errp);
+                     Error *errp[static 1]);
 
 typedef struct {
     QemuOpts *opts;
@@ -111,37 +111,39 @@ const char *qemu_opt_iter_next(QemuOptsIter *iter);
 
 QemuOpts *qemu_opts_find(QemuOptsList *list, const char *id);
 QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id,
-                           int fail_if_exists, Error **errp);
+                           int fail_if_exists, Error *errp[static 1]);
 void qemu_opts_reset(QemuOptsList *list);
 void qemu_opts_loc_restore(QemuOpts *opts);
 void qemu_opts_set(QemuOptsList *list, const char *id,
-                   const char *name, const char *value, Error **errp);
+                   const char *name, const char *value, Error *errp[static 1]);
 const char *qemu_opts_id(QemuOpts *opts);
 void qemu_opts_set_id(QemuOpts *opts, char *id);
 void qemu_opts_del(QemuOpts *opts);
-void qemu_opts_validate(QemuOpts *opts, const QemuOptDesc *desc, Error **errp);
+void qemu_opts_validate(QemuOpts *opts, const QemuOptDesc *desc,
+			Error *errp[static 1]);
 void qemu_opts_do_parse(QemuOpts *opts, const char *params,
-                        const char *firstname, Error **errp);
+                        const char *firstname, Error *errp[static 1]);
 QemuOpts *qemu_opts_parse_noisily(QemuOptsList *list, const char *params,
                                   bool permit_abbrev);
 QemuOpts *qemu_opts_parse(QemuOptsList *list, const char *params,
-                          bool permit_abbrev, Error **errp);
+                          bool permit_abbrev, Error *errp[static 1]);
 void qemu_opts_set_defaults(QemuOptsList *list, const char *params,
                             int permit_abbrev);
 QemuOpts *qemu_opts_from_qdict(QemuOptsList *list, const QDict *qdict,
-                               Error **errp);
+                               Error *errp[static 1]);
 QDict *qemu_opts_to_qdict(QemuOpts *opts, QDict *qdict);
-void qemu_opts_absorb_qdict(QemuOpts *opts, QDict *qdict, Error **errp);
+void qemu_opts_absorb_qdict(QemuOpts *opts, QDict *qdict,
+			    Error *errp[static 1]);
 
 typedef int (*qemu_opts_loopfunc)(void *opaque, QemuOpts *opts, Error **errp);
 int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func,
-                      void *opaque, Error **errp);
+                      void *opaque, Error *errp[static 1]);
 void qemu_opts_print(QemuOpts *opts, const char *sep);
 void qemu_opts_print_help(QemuOptsList *list);
 void qemu_opts_free(QemuOptsList *list);
 QemuOptsList *qemu_opts_append(QemuOptsList *dst, QemuOptsList *list);
 
 QDict *keyval_parse(const char *params, const char *implied_key,
-                    Error **errp);
+                    Error *errp[static 1]);
 
 #endif
include/qemu/sockets.h +18 -15
index 5c326db232..703e94ef47 100644
@@ -33,24 +33,26 @@ int socket_set_fast_reuse(int fd);
 typedef void NonBlockingConnectHandler(int fd, Error *err, void *opaque);
 
 int inet_ai_family_from_address(InetSocketAddress *addr,
-                                Error **errp);
-int inet_parse(InetSocketAddress *addr, const char *str, Error **errp);
-int inet_connect(const char *str, Error **errp);
+                                Error *errp[static 1]);
+int inet_parse(InetSocketAddress *addr, const char *str,
+	       Error *errp[static 1]);
+int inet_connect(const char *str, Error *errp[static 1]);
 int inet_connect_saddr(InetSocketAddress *saddr,
                        NonBlockingConnectHandler *callback, void *opaque,
-                       Error **errp);
+                       Error *errp[static 1]);
 
 NetworkAddressFamily inet_netfamily(int family);
 
-int unix_listen(const char *path, char *ostr, int olen, Error **errp);
-int unix_connect(const char *path, Error **errp);
+int unix_listen(const char *path, char *ostr, int olen, Error *errp[static 1]);
+int unix_connect(const char *path, Error *errp[static 1]);
 
-SocketAddress *socket_parse(const char *str, Error **errp);
+SocketAddress *socket_parse(const char *str, Error *errp[static 1]);
 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);
+                   void *opaque, Error *errp[static 1]);
+int socket_listen(SocketAddress *addr, Error *errp[static 1]);
+void socket_listen_cleanup(int fd, Error *errp[static 1]);
+int socket_dgram(SocketAddress *remote, SocketAddress *local,
+		 Error *errp[static 1]);
 
 /* Old, ipv4 only bits.  Don't use for new code. */
 int parse_host_port(struct sockaddr_in *saddr, const char *str);
@@ -73,7 +75,7 @@ int socket_init(void);
 SocketAddress *
 socket_sockaddr_to_address(struct sockaddr_storage *sa,
                            socklen_t salen,
-                           Error **errp);
+                           Error *errp[static 1]);
 
 /**
  * socket_local_address:
@@ -88,7 +90,7 @@ socket_sockaddr_to_address(struct sockaddr_storage *sa,
  *
  * Returns: the socket address struct, or NULL on error
  */
-SocketAddress *socket_local_address(int fd, Error **errp);
+SocketAddress *socket_local_address(int fd, Error *errp[static 1]);
 
 /**
  * socket_remote_address:
@@ -103,7 +105,7 @@ SocketAddress *socket_local_address(int fd, Error **errp);
  *
  * Returns: the socket address struct, or NULL on error
  */
-SocketAddress *socket_remote_address(int fd, Error **errp);
+SocketAddress *socket_remote_address(int fd, Error *errp[static 1]);
 
 /**
  * socket_address_to_string:
@@ -118,7 +120,8 @@ SocketAddress *socket_remote_address(int fd, Error **errp);
  *
  * Returns: the socket address in string format, or NULL on error
  */
-char *socket_address_to_string(struct SocketAddress *addr, Error **errp);
+char *socket_address_to_string(struct SocketAddress *addr,
+			       Error *errp[static 1]);
 
 /**
  * socket_address_flatten:
include/qemu/throttle.h +1 -1
index 9109657609..d7c4c058f5 100644
@@ -136,7 +136,7 @@ bool throttle_timers_are_initialized(ThrottleTimers *tt);
 /* configuration */
 bool throttle_enabled(ThrottleConfig *cfg);
 
-bool throttle_is_valid(ThrottleConfig *cfg, Error **errp);
+bool throttle_is_valid(ThrottleConfig *cfg, Error *errp[static 1]);
 
 void throttle_config(ThrottleState *ts,
                      ThrottleTimers *tt,
include/qom/cpu.h +2 -2
index 89ddb686fb..f048419a9f 100644
@@ -446,7 +446,7 @@ bool cpu_paging_enabled(const CPUState *cpu);
  * @errp: Pointer for reporting an #Error.
  */
 void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
-                            Error **errp);
+                            Error *errp[static 1]);
 
 /**
  * cpu_write_elf64_note:
@@ -1002,7 +1002,7 @@ AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx);
 void QEMU_NORETURN cpu_abort(CPUState *cpu, const char *fmt, ...)
     GCC_FMT_ATTR(2, 3);
 void cpu_exec_initfn(CPUState *cpu);
-void cpu_exec_realizefn(CPUState *cpu, Error **errp);
+void cpu_exec_realizefn(CPUState *cpu, Error *errp[static 1]);
 void cpu_exec_unrealizefn(CPUState *cpu);
 
 #ifdef CONFIG_SOFTMMU
include/qom/object.h +47 -42

301 lines not on this page · raw message

include/qom/object_interfaces.h +6 -6
index fdd7603c84..7326a93bcf 100644
@@ -63,7 +63,7 @@ typedef struct UserCreatableClass {
  * from implements USER_CREATABLE interface, otherwise the call does
  * nothing.
  */
-void user_creatable_complete(Object *obj, Error **errp);
+void user_creatable_complete(Object *obj, Error *errp[static 1]);
 
 /**
  * user_creatable_can_be_deleted:
@@ -73,7 +73,7 @@ void user_creatable_complete(Object *obj, Error **errp);
  * Wrapper to call can_be_deleted() method if one of types it's inherited
  * from implements USER_CREATABLE interface.
  */
-bool user_creatable_can_be_deleted(UserCreatable *uc, Error **errp);
+bool user_creatable_can_be_deleted(UserCreatable *uc, Error *errp[static 1]);
 
 /**
  * user_creatable_add_type:
@@ -91,7 +91,7 @@ bool user_creatable_can_be_deleted(UserCreatable *uc, Error **errp);
  */
 Object *user_creatable_add_type(const char *type, const char *id,
                                 const QDict *qdict,
-                                Visitor *v, Error **errp);
+                                Visitor *v, Error *errp[static 1]);
 
 /**
  * user_creatable_add_opts:
@@ -106,7 +106,7 @@ Object *user_creatable_add_type(const char *type, const char *id,
  *
  * Returns: the newly created object or NULL on error
  */
-Object *user_creatable_add_opts(QemuOpts *opts, Error **errp);
+Object *user_creatable_add_opts(QemuOpts *opts, Error *errp[static 1]);
 
 
 /**
@@ -136,7 +136,7 @@ typedef bool (*user_creatable_add_opts_predicate)(const char *type);
  * Returns: 0 on success, -1 when an error was reported.
  */
 int user_creatable_add_opts_foreach(void *opaque,
-                                    QemuOpts *opts, Error **errp);
+                                    QemuOpts *opts, Error *errp[static 1]);
 
 /**
  * user_creatable_del:
@@ -146,6 +146,6 @@ int user_creatable_add_opts_foreach(void *opaque,
  * Delete an instance of the user creatable object identified
  * by @id.
  */
-void user_creatable_del(const char *id, Error **errp);
+void user_creatable_del(const char *id, Error *errp[static 1]);
 
 #endif
include/qom/qom-qobject.h +2 -2
index 3d49d26681..fc590222f3 100644
@@ -26,7 +26,7 @@
  * an error occurs.
  */
 struct QObject *object_property_get_qobject(Object *obj, const char *name,
-                                            Error **errp);
+                                            Error *errp[static 1]);
 
 /**
  * object_property_set_qobject:
@@ -38,6 +38,6 @@ struct QObject *object_property_get_qobject(Object *obj, const char *name,
  * Writes a property to a object.
  */
 void object_property_set_qobject(Object *obj, struct QObject *qobj,
-                                 const char *name, Error **errp);
+                                 const char *name, Error *errp[static 1]);
 
 #endif
include/sysemu/arch_init.h +4 -4
index 8751c468ed..31217a15da 100644
@@ -31,15 +31,15 @@ extern const uint32_t arch_type;
 int kvm_available(void);
 int xen_available(void);
 
-CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp);
+CpuDefinitionInfoList *arch_query_cpu_definitions(Error *errp[static 1]);
 CpuModelExpansionInfo *arch_query_cpu_model_expansion(CpuModelExpansionType type,
                                                       CpuModelInfo *mode,
-                                                      Error **errp);
+                                                      Error *errp[static 1]);
 CpuModelCompareInfo *arch_query_cpu_model_comparison(CpuModelInfo *modela,
                                                      CpuModelInfo *modelb,
-                                                     Error **errp);
+                                                     Error *errp[static 1]);
 CpuModelBaselineInfo *arch_query_cpu_model_baseline(CpuModelInfo *modela,
                                                     CpuModelInfo *modelb,
-                                                    Error **errp);
+                                                    Error *errp[static 1]);
 
 #endif
include/sysemu/block-backend.h +11 -8
index 840ad6134c..88631cc604 100644
@@ -94,7 +94,7 @@ typedef struct BlockBackendPublic {
 
 BlockBackend *blk_new(uint64_t perm, uint64_t shared_perm);
 BlockBackend *blk_new_open(const char *filename, const char *reference,
-                           QDict *options, int flags, Error **errp);
+                           QDict *options, int flags, Error *errp[static 1]);
 int blk_get_refcnt(BlockBackend *blk);
 void blk_ref(BlockBackend *blk);
 void blk_unref(BlockBackend *blk);
@@ -102,7 +102,8 @@ void blk_remove_all_bs(void);
 const char *blk_name(const BlockBackend *blk);
 BlockBackend *blk_by_name(const char *name);
 BlockBackend *blk_next(BlockBackend *blk);
-bool monitor_add_blk(BlockBackend *blk, const char *name, Error **errp);
+bool monitor_add_blk(BlockBackend *blk, const char *name,
+		     Error *errp[static 1]);
 void monitor_remove_blk(BlockBackend *blk);
 
 BlockBackendPublic *blk_get_public(BlockBackend *blk);
@@ -110,11 +111,12 @@ BlockBackend *blk_by_public(BlockBackendPublic *public);
 
 BlockDriverState *blk_bs(BlockBackend *blk);
 void blk_remove_bs(BlockBackend *blk);
-int blk_insert_bs(BlockBackend *blk, BlockDriverState *bs, Error **errp);
+int blk_insert_bs(BlockBackend *blk, BlockDriverState *bs,
+		  Error *errp[static 1]);
 bool bdrv_has_blk(BlockDriverState *bs);
 bool bdrv_is_root_node(BlockDriverState *bs);
 int blk_set_perm(BlockBackend *blk, uint64_t perm, uint64_t shared_perm,
-                 Error **errp);
+                 Error *errp[static 1]);
 void blk_get_perm(BlockBackend *blk, uint64_t *perm, uint64_t *shared_perm);
 
 void blk_set_allow_write_beyond_eof(BlockBackend *blk, bool allow);
@@ -129,7 +131,7 @@ void blk_attach_dev_legacy(BlockBackend *blk, void *dev);
 void blk_detach_dev(BlockBackend *blk, void *dev);
 void *blk_get_attached_dev(BlockBackend *blk);
 BlockBackend *blk_by_dev(void *dev);
-BlockBackend *blk_by_qdev_id(const char *id, Error **errp);
+BlockBackend *blk_by_qdev_id(const char *id, Error *errp[static 1]);
 void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops, void *opaque);
 int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf,
                           int count);
@@ -184,7 +186,7 @@ int blk_is_read_only(BlockBackend *blk);
 int blk_is_sg(BlockBackend *blk);
 int blk_enable_write_cache(BlockBackend *blk);
 void blk_set_enable_write_cache(BlockBackend *blk, bool wce);
-void blk_invalidate_cache(BlockBackend *blk, Error **errp);
+void blk_invalidate_cache(BlockBackend *blk, Error *errp[static 1]);
 bool blk_is_inserted(BlockBackend *blk);
 bool blk_is_available(BlockBackend *blk);
 void blk_lock_medium(BlockBackend *blk, bool locked);
@@ -195,7 +197,8 @@ int blk_get_max_iov(BlockBackend *blk);
 void blk_set_guest_block_size(BlockBackend *blk, int align);
 void *blk_try_blockalign(BlockBackend *blk, size_t size);
 void *blk_blockalign(BlockBackend *blk, size_t size);
-bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp);
+bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op,
+		       Error *errp[static 1]);
 void blk_op_unblock(BlockBackend *blk, BlockOpType op, Error *reason);
 void blk_op_block_all(BlockBackend *blk, Error *reason);
 void blk_op_unblock_all(BlockBackend *blk, Error *reason);
@@ -225,7 +228,7 @@ int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset,
                                       int count, BdrvRequestFlags flags);
 int blk_pwrite_compressed(BlockBackend *blk, int64_t offset, const void *buf,
                           int count);
-int blk_truncate(BlockBackend *blk, int64_t offset, Error **errp);
+int blk_truncate(BlockBackend *blk, int64_t offset, Error *errp[static 1]);
 int blk_pdiscard(BlockBackend *blk, int64_t offset, int count);
 int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf,
                      int64_t pos, int size);
include/sysemu/cpus.h +2 -2
index 731756d948..72d0fdccf9 100644
@@ -11,7 +11,7 @@ void pause_all_vcpus(void);
 void cpu_stop_current(void);
 void cpu_ticks_init(void);
 
-void configure_icount(QemuOpts *opts, Error **errp);
+void configure_icount(QemuOpts *opts, Error *errp[static 1]);
 extern int use_icount;
 extern int icount_align_option;
 
@@ -40,6 +40,6 @@ extern int smp_threads;
 
 void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg);
 
-void qemu_tcg_configure(QemuOpts *opts, Error **errp);
+void qemu_tcg_configure(QemuOpts *opts, Error *errp[static 1]);
 
 #endif
include/sysemu/cryptodev.h +4 -4
index a9d0d1ee25..9c9bff41f9 100644
@@ -244,7 +244,7 @@ void cryptodev_backend_free_client(
  */
 void cryptodev_backend_cleanup(
            CryptoDevBackend *backend,
-           Error **errp);
+           Error *errp[static 1]);
 
 /**
  * cryptodev_backend_sym_create_session:
@@ -260,7 +260,7 @@ void cryptodev_backend_cleanup(
 int64_t cryptodev_backend_sym_create_session(
            CryptoDevBackend *backend,
            CryptoDevBackendSymSessionInfo *sess_info,
-           uint32_t queue_index, Error **errp);
+           uint32_t queue_index, Error *errp[static 1]);
 
 /**
  * cryptodev_backend_sym_close_session:
@@ -277,7 +277,7 @@ int64_t cryptodev_backend_sym_create_session(
 int cryptodev_backend_sym_close_session(
            CryptoDevBackend *backend,
            uint64_t session_id,
-           uint32_t queue_index, Error **errp);
+           uint32_t queue_index, Error *errp[static 1]);
 
 /**
  * cryptodev_backend_crypto_operation:
@@ -295,7 +295,7 @@ int cryptodev_backend_sym_close_session(
 int cryptodev_backend_crypto_operation(
                  CryptoDevBackend *backend,
                  void *opaque,
-                 uint32_t queue_index, Error **errp);
+                 uint32_t queue_index, Error *errp[static 1]);
 
 /**
  * cryptodev_backend_set_used:
include/sysemu/device_tree.h +3 -3
index e22e5bec9c..9e3f57d5f8 100644
@@ -41,7 +41,7 @@ void *load_device_tree_from_sysfs(void);
  * was encountered when parsing the blob, the function returns NULL
  */
 char **qemu_fdt_node_path(void *fdt, const char *name, char *compat,
-                          Error **errp);
+                          Error *errp[static 1]);
 
 int qemu_fdt_setprop(void *fdt, const char *node_path,
                      const char *property, const void *val, int size);
@@ -66,7 +66,7 @@ int qemu_fdt_setprop_phandle(void *fdt, const char *node_path,
  */
 const void *qemu_fdt_getprop(void *fdt, const char *node_path,
                              const char *property, int *lenp,
-                             Error **errp);
+                             Error *errp[static 1]);
 /**
  * qemu_fdt_getprop_cell: retrieve the value of a given 4 byte property
  * @fdt: pointer to the device tree blob
@@ -80,7 +80,7 @@ const void *qemu_fdt_getprop(void *fdt, const char *node_path,
  */
 uint32_t qemu_fdt_getprop_cell(void *fdt, const char *node_path,
                                const char *property, int *lenp,
-                               Error **errp);
+                               Error *errp[static 1]);
 uint32_t qemu_fdt_get_phandle(void *fdt, const char *path);
 uint32_t qemu_fdt_alloc_phandle(void *fdt);
 int qemu_fdt_nop_node(void *fdt, const char *node_path);
include/sysemu/hostmem.h +1 -1
index ed6a437f4d..9c3ce9706d 100644
@@ -64,7 +64,7 @@ struct HostMemoryBackend {
 
 bool host_memory_backend_mr_inited(HostMemoryBackend *backend);
 MemoryRegion *host_memory_backend_get_memory(HostMemoryBackend *backend,
-                                             Error **errp);
+                                             Error *errp[static 1]);
 
 void host_memory_backend_set_mapped(HostMemoryBackend *backend, bool mapped);
 bool host_memory_backend_is_mapped(HostMemoryBackend *backend);
include/sysemu/memory_mapping.h +1 -1
index 706152d533..ca65337a31 100644
@@ -73,7 +73,7 @@ void guest_phys_blocks_append(GuestPhysBlockList *list);
 
 void qemu_get_guest_memory_mapping(MemoryMappingList *list,
                                    const GuestPhysBlockList *guest_phys_blocks,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 
 /* get guest's memory mapping without do paging(virtual address is 0). */
 void qemu_get_guest_simple_memory_mapping(MemoryMappingList *list,
include/sysemu/numa.h +3 -2
index 610eece211..d46d8431c8 100644
@@ -30,10 +30,11 @@ void query_numa_node_mem(uint64_t node_mem[]);
 extern QemuOptsList qemu_numa_opts;
 void numa_set_mem_node_id(ram_addr_t addr, uint64_t size, uint32_t node);
 void numa_unset_mem_node_id(ram_addr_t addr, uint64_t size, uint32_t node);
-uint32_t numa_get_node(ram_addr_t addr, Error **errp);
+uint32_t numa_get_node(ram_addr_t addr, Error *errp[static 1]);
 void numa_legacy_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
                                  int nb_nodes, ram_addr_t size);
 void numa_default_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
                                   int nb_nodes, ram_addr_t size);
-void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **errp);
+void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev,
+		       Error *errp[static 1]);
 #endif
include/sysemu/qtest.h +2 -1
index 70aa40aa72..68a28b4f2b 100644
@@ -25,7 +25,8 @@ static inline bool qtest_enabled(void)
 
 bool qtest_driver(void);
 
-void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp);
+void qtest_init(const char *qtest_chrdev, const char *qtest_log,
+		Error *errp[static 1]);
 
 static inline int qtest_available(void)
 {
include/sysemu/sysemu.h +5 -5
index 9841a527a1..1617b25d49 100644
@@ -176,19 +176,19 @@ void add_boot_device_path(int32_t bootindex, DeviceState *dev,
 char *get_boot_devices_list(size_t *size, bool ignore_suffixes);
 
 DeviceState *get_boot_device(uint32_t position);
-void check_boot_index(int32_t bootindex, Error **errp);
+void check_boot_index(int32_t bootindex, Error *errp[static 1]);
 void del_boot_device_path(DeviceState *dev, const char *suffix);
 void device_add_bootindex_property(Object *obj, int32_t *bootindex,
                                    const char *name, const char *suffix,
-                                   DeviceState *dev, Error **errp);
+                                   DeviceState *dev, Error *errp[static 1]);
 void restore_boot_order(void *opaque);
-void validate_bootdevices(const char *devices, Error **errp);
+void validate_bootdevices(const char *devices, Error *errp[static 1]);
 
 /* handler to set the boot_device order for a specific type of MachineClass */
 typedef void QEMUBootSetHandler(void *opaque, const char *boot_order,
-                                Error **errp);
+                                Error *errp[static 1]);
 void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque);
-void qemu_boot_set(const char *boot_order, Error **errp);
+void qemu_boot_set(const char *boot_order, Error *errp[static 1]);
 
 QemuOpts *qemu_get_machine_opts(void);
 
include/sysemu/tpm_backend.h +1 -1
index b58f52d39f..8dcff421a4 100644
@@ -211,7 +211,7 @@ int tpm_backend_reset_tpm_established_flag(TPMBackend *s, uint8_t locty);
  * This function will open the backend if it is not already open.  Calling this
  * function on an already opened backend will not result in an error.
  */
-void tpm_backend_open(TPMBackend *s, Error **errp);
+void tpm_backend_open(TPMBackend *s, Error *errp[static 1]);
 
 /**
  * tpm_backend_get_tpm_version:
include/ui/console.h +8 -6
index 7262bef6d3..bb6fcfec57 100644
@@ -388,7 +388,8 @@ void qemu_console_early_init(void);
 QemuConsole *qemu_console_lookup_by_index(unsigned int index);
 QemuConsole *qemu_console_lookup_by_device(DeviceState *dev, uint32_t head);
 QemuConsole *qemu_console_lookup_by_device_name(const char *device_id,
-                                                uint32_t head, Error **errp);
+                                                uint32_t head,
+                                                Error *errp[static 1]);
 bool qemu_console_is_visible(QemuConsole *con);
 bool qemu_console_is_graphic(QemuConsole *con);
 bool qemu_console_is_fixedsize(QemuConsole *con);
@@ -463,13 +464,13 @@ static inline void cocoa_display_init(DisplayState *ds, int full_screen)
 
 /* vnc.c */
 void vnc_display_init(const char *id);
-void vnc_display_open(const char *id, Error **errp);
+void vnc_display_open(const char *id, Error *errp[static 1]);
 void vnc_display_add_client(const char *id, int csock, bool skipauth);
 #ifdef CONFIG_VNC
 int vnc_display_password(const char *id, const char *password);
 int vnc_display_pw_expire(const char *id, time_t expires);
-QemuOpts *vnc_parse(const char *str, Error **errp);
-int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp);
+QemuOpts *vnc_parse(const char *str, Error *errp[static 1]);
+int vnc_init_func(void *opaque, QemuOpts *opts, Error *errp[static 1]);
 #else
 static inline int vnc_display_password(const char *id, const char *password)
 {
@@ -479,12 +480,13 @@ static inline int vnc_display_pw_expire(const char *id, time_t expires)
 {
     return -ENODEV;
 };
-static inline QemuOpts *vnc_parse(const char *str, Error **errp)
+static inline QemuOpts *vnc_parse(const char *str, Error *errp[static 1])
 {
     error_setg(errp, "VNC support is disabled");
     return NULL;
 }
-static inline int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp)
+static inline int vnc_init_func(void *opaque, QemuOpts *opts,
+                                Error *errp[static 1])
 {
     error_setg(errp, "VNC support is disabled");
     return -1;
include/ui/input.h +1 -1
index 3cfd0f3363..6b3a2e5420 100644
@@ -32,7 +32,7 @@ void qemu_input_handler_deactivate(QemuInputHandlerState *s);
 void qemu_input_handler_unregister(QemuInputHandlerState *s);
 void qemu_input_handler_bind(QemuInputHandlerState *s,
                              const char *device_id, int head,
-                             Error **errp);
+                             Error *errp[static 1]);
 void qemu_input_event_send(QemuConsole *src, InputEvent *evt);
 void qemu_input_event_send_impl(QemuConsole *src, InputEvent *evt);
 void qemu_input_event_sync(void);
include/ui/qemu-spice.h +1 -1
index 52a9f8808b..8054833e09 100644
@@ -96,7 +96,7 @@ static inline void qemu_spice_init(void)
 
 #endif /* CONFIG_SPICE */
 
-static inline bool qemu_using_spice(Error **errp)
+static inline bool qemu_using_spice(Error *errp[static 1])
 {
     if (!using_spice) {
         error_set(errp, ERROR_CLASS_DEVICE_NOT_ACTIVE,
migration/block.h +1 -1
index 22ebe94259..bc2ee0a0ae 100644
@@ -41,5 +41,5 @@ static inline uint64_t blk_mig_bytes_total(void)
 }
 #endif /* CONFIG_LIVE_BLOCK_MIGRATION */
 
-void migrate_set_block_enabled(bool value, Error **errp);
+void migrate_set_block_enabled(bool value, Error *errp[static 1]);
 #endif /* MIGRATION_BLOCK_H */
migration/exec.h +3 -2
index b210ffde7a..1facf8d7c3 100644
@@ -19,8 +19,9 @@
 
 #ifndef QEMU_MIGRATION_EXEC_H
 #define QEMU_MIGRATION_EXEC_H
-void exec_start_incoming_migration(const char *host_port, Error **errp);
+void exec_start_incoming_migration(const char *host_port,
+				   Error *errp[static 1]);
 
 void exec_start_outgoing_migration(MigrationState *s, const char *host_port,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 #endif
migration/fd.h +2 -2
index a14a63ce2e..44c7ac84d9 100644
@@ -16,8 +16,8 @@
 
 #ifndef QEMU_MIGRATION_FD_H
 #define QEMU_MIGRATION_FD_H
-void fd_start_incoming_migration(const char *path, Error **errp);
+void fd_start_incoming_migration(const char *path, Error *errp[static 1]);
 
 void fd_start_outgoing_migration(MigrationState *s, const char *fdname,
-                                 Error **errp);
+                                 Error *errp[static 1]);
 #endif
migration/rdma.h +3 -2
index de2ba09dc5..1a8ccc3fea 100644
@@ -18,8 +18,9 @@
 #define QEMU_MIGRATION_RDMA_H
 
 void rdma_start_outgoing_migration(void *opaque, const char *host_port,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 
-void rdma_start_incoming_migration(const char *host_port, Error **errp);
+void rdma_start_incoming_migration(const char *host_port,
+				   Error *errp[static 1]);
 
 #endif
migration/savevm.h +1 -1
index eb4487771a..e606f0f702 100644
@@ -14,7 +14,7 @@
 #ifndef MIGRATION_SAVEVM_H
 #define MIGRATION_SAVEVM_H
 
-bool qemu_savevm_state_blocked(Error **errp);
+bool qemu_savevm_state_blocked(Error *errp[static 1]);
 void qemu_savevm_state_begin(QEMUFile *f);
 void qemu_savevm_state_header(QEMUFile *f);
 int qemu_savevm_state_iterate(QEMUFile *f, bool postcopy);
migration/socket.h +5 -4
index 6b91e9db38..d913f270ab 100644
@@ -16,13 +16,14 @@
 
 #ifndef QEMU_MIGRATION_SOCKET_H
 #define QEMU_MIGRATION_SOCKET_H
-void tcp_start_incoming_migration(const char *host_port, Error **errp);
+void tcp_start_incoming_migration(const char *host_port,
+				  Error *errp[static 1]);
 
 void tcp_start_outgoing_migration(MigrationState *s, const char *host_port,
-                                  Error **errp);
+                                  Error *errp[static 1]);
 
-void unix_start_incoming_migration(const char *path, Error **errp);
+void unix_start_incoming_migration(const char *path, Error *errp[static 1]);
 
 void unix_start_outgoing_migration(MigrationState *s, const char *path,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 #endif
migration/tls.h +2 -2
index cdd70001ed..455552db87 100644
@@ -25,10 +25,10 @@
 
 void migration_tls_channel_process_incoming(MigrationState *s,
                                             QIOChannel *ioc,
-                                            Error **errp);
+                                            Error *errp[static 1]);
 
 void migration_tls_channel_connect(MigrationState *s,
                                    QIOChannel *ioc,
                                    const char *hostname,
-                                   Error **errp);
+                                   Error *errp[static 1]);
 #endif
nbd/nbd-internal.h +3 -3
index d6071640a0..f3ba5d5d92 100644
@@ -101,7 +101,7 @@
  * iteratively.
  */
 static inline ssize_t read_sync_eof(QIOChannel *ioc, void *buffer, size_t size,
-                                    Error **errp)
+                                    Error *errp[static 1])
 {
     struct iovec iov = { .iov_base = buffer, .iov_len = size };
     /* Sockets are kept in blocking mode in the negotiation phase.  After
@@ -116,7 +116,7 @@ static inline ssize_t read_sync_eof(QIOChannel *ioc, void *buffer, size_t size,
  * Reads @size bytes from @ioc. Returns 0 on success.
  */
 static inline int read_sync(QIOChannel *ioc, void *buffer, size_t size,
-                            Error **errp)
+                            Error *errp[static 1])
 {
     ssize_t ret = read_sync_eof(ioc, buffer, size, errp);
 
@@ -132,7 +132,7 @@ static inline int read_sync(QIOChannel *ioc, void *buffer, size_t size,
  * Writes @size bytes to @ioc. Returns 0 on success.
  */
 static inline int write_sync(QIOChannel *ioc, const void *buffer, size_t size,
-                             Error **errp)
+                             Error *errp[static 1])
 {
     struct iovec iov = { .iov_base = (void *) buffer, .iov_len = size };
 
net/clients.h +10 -10
index 5cae479730..c11d22ddf5 100644
@@ -28,38 +28,38 @@
 #include "qapi-types.h"
 
 int net_init_dump(const Netdev *netdev, const char *name,
-                  NetClientState *peer, Error **errp);
+                  NetClientState *peer, Error *errp[static 1]);
 
 #ifdef CONFIG_SLIRP
 int net_init_slirp(const Netdev *netdev, const char *name,
-                   NetClientState *peer, Error **errp);
+                   NetClientState *peer, Error *errp[static 1]);
 #endif
 
 int net_init_hubport(const Netdev *netdev, const char *name,
-                     NetClientState *peer, Error **errp);
+                     NetClientState *peer, Error *errp[static 1]);
 
 int net_init_socket(const Netdev *netdev, const char *name,
-                    NetClientState *peer, Error **errp);
+                    NetClientState *peer, Error *errp[static 1]);
 
 int net_init_tap(const Netdev *netdev, const char *name,
-                 NetClientState *peer, Error **errp);
+                 NetClientState *peer, Error *errp[static 1]);
 
 int net_init_bridge(const Netdev *netdev, const char *name,
-                    NetClientState *peer, Error **errp);
+                    NetClientState *peer, Error *errp[static 1]);
 
 int net_init_l2tpv3(const Netdev *netdev, const char *name,
-                    NetClientState *peer, Error **errp);
+                    NetClientState *peer, Error *errp[static 1]);
 #ifdef CONFIG_VDE
 int net_init_vde(const Netdev *netdev, const char *name,
-                 NetClientState *peer, Error **errp);
+                 NetClientState *peer, Error *errp[static 1]);
 #endif
 
 #ifdef CONFIG_NETMAP
 int net_init_netmap(const Netdev *netdev, const char *name,
-                    NetClientState *peer, Error **errp);
+                    NetClientState *peer, Error *errp[static 1]);
 #endif
 
 int net_init_vhost_user(const Netdev *netdev, const char *name,
-                        NetClientState *peer, Error **errp);
+                        NetClientState *peer, Error *errp[static 1]);
 
 #endif /* QEMU_NET_CLIENTS_H */
net/tap_int.h +3 -2
index ae6888f74a..deb2b0fe1d 100644
@@ -30,11 +30,12 @@
 #include "qapi-types.h"
 
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
-             int vnet_hdr_required, int mq_required, Error **errp);
+             int vnet_hdr_required, int mq_required, Error *errp[static 1]);
 
 ssize_t tap_read_packet(int tapfd, uint8_t *buf, int maxlen);
 
-void tap_set_sndbuf(int fd, const NetdevTapOptions *tap, Error **errp);
+void tap_set_sndbuf(int fd, const NetdevTapOptions *tap,
+		    Error *errp[static 1]);
 int tap_probe_vnet_hdr(int fd);
 int tap_probe_vnet_hdr_len(int fd, int len);
 int tap_probe_has_ufo(int fd);
qga/guest-agent-core.h +2 -2
index 3e8a4acff2..b01321ae7e 100644
@@ -40,8 +40,8 @@ bool ga_is_frozen(GAState *s);
 void ga_set_frozen(GAState *s);
 void ga_unset_frozen(GAState *s);
 const char *ga_fsfreeze_hook(GAState *s);
-int64_t ga_get_fd_handle(GAState *s, Error **errp);
-int ga_parse_whence(GuestFileWhence *whence, Error **errp);
+int64_t ga_get_fd_handle(GAState *s, Error *errp[static 1]);
+int ga_parse_whence(GuestFileWhence *whence, Error *errp[static 1]);
 
 #ifndef _WIN32
 void reopen_fd_to_null(int fd);
qga/vss-win32.h +1 -1
index 4f8e39aa5c..52fe12cdbd 100644
@@ -22,6 +22,6 @@ bool vss_initialized(void);
 int ga_install_vss_provider(void);
 void ga_uninstall_vss_provider(void);
 
-void qga_vss_fsfreeze(int *nr_volume, bool freeze, Error **errp);
+void qga_vss_fsfreeze(int *nr_volume, bool freeze, Error *errp[static 1]);
 
 #endif
replication.h +4 -4
index ece6ca6133..e31f1e5aa3 100644
@@ -143,7 +143,7 @@ void replication_remove(ReplicationState *rs);
  *
  * Note: the caller of the function MUST make sure vm stopped
  */
-void replication_start_all(ReplicationMode mode, Error **errp);
+void replication_start_all(ReplicationMode mode, Error *errp[static 1]);
 
 /**
  * replication_do_checkpoint_all:
@@ -151,7 +151,7 @@ void replication_start_all(ReplicationMode mode, Error **errp);
  *
  * This interface is called after all VM state is transferred to Secondary QEMU
  */
-void replication_do_checkpoint_all(Error **errp);
+void replication_do_checkpoint_all(Error *errp[static 1]);
 
 /**
  * replication_get_error_all:
@@ -159,7 +159,7 @@ void replication_do_checkpoint_all(Error **errp);
  *
  * This interface is called to check if error occurred during replication
  */
-void replication_get_error_all(Error **errp);
+void replication_get_error_all(Error *errp[static 1]);
 
 /**
  * replication_stop_all:
@@ -169,6 +169,6 @@ void replication_get_error_all(Error **errp);
  * It is called on failover. The vm should be stopped before calling it, if you
  * use this API to shutdown the guest, or other things except failover
  */
-void replication_stop_all(bool failover, Error **errp);
+void replication_stop_all(bool failover, Error *errp[static 1]);
 
 #endif /* REPLICATION_H */
target/i386/cpu.h +1 -1
index de0551f775..cdf77dc82a 100644
@@ -1311,7 +1311,7 @@ int x86_cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu,
                                  void *opaque);
 
 void x86_cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
-                                Error **errp);
+                                Error *errp[static 1]);
 
 void x86_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
                         int flags);
target/ppc/cpu.h +3 -2
index d10808d9f4..fdaeacffce 100644
@@ -1370,9 +1370,10 @@ static inline int cpu_mmu_index (CPUPPCState *env, bool ifetch)
 #if defined(TARGET_PPC64)
 bool ppc_check_compat(PowerPCCPU *cpu, uint32_t compat_pvr,
                       uint32_t min_compat_pvr, uint32_t max_compat_pvr);
-void ppc_set_compat(PowerPCCPU *cpu, uint32_t compat_pvr, Error **errp);
+void ppc_set_compat(PowerPCCPU *cpu, uint32_t compat_pvr,
+		    Error *errp[static 1]);
 #if !defined(CONFIG_USER_ONLY)
-void ppc_set_compat_all(uint32_t compat_pvr, Error **errp);
+void ppc_set_compat_all(uint32_t compat_pvr, Error *errp[static 1]);
 #endif
 int ppc_compat_max_threads(PowerPCCPU *cpu);
 #endif /* defined(TARGET_PPC64) */
target/s390x/cpu.h +4 -3
index 2ce509f601..b988708249 100644
@@ -470,8 +470,9 @@ void trigger_pgm_exception(CPUS390XState *env, uint32_t code, uint32_t ilen);
 #endif
 
 S390CPU *cpu_s390x_init(const char *cpu_model);
-S390CPU *s390x_new_cpu(const char *cpu_model, int64_t id, Error **errp);
-S390CPU *cpu_s390x_create(const char *cpu_model, Error **errp);
+S390CPU *s390x_new_cpu(const char *cpu_model, int64_t id,
+		       Error *errp[static 1]);
+S390CPU *cpu_s390x_create(const char *cpu_model, Error *errp[static 1]);
 void s390x_translate_init(void);
 
 /* you can call this signal handler from your SIGBUS and SIGSEGV
@@ -640,7 +641,7 @@ void s390_cpu_list(FILE *f, fprintf_function cpu_fprintf);
 #define cpu_list s390_cpu_list
 void s390_cpu_model_register_props(Object *obj);
 void s390_cpu_model_class_register_props(ObjectClass *oc);
-void s390_realize_cpu_model(CPUState *cs, Error **errp);
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

target/s390x/cpu_models.h +5 -4
index 136a602313..15f64f08ed 100644

Lines of this file are not shown. View the raw message.

qapi/qapi-visit-core.c +33 -25

58 lines not on this page · raw message

arch_init.c +1 -1
index a0b8ed6167..2e92cb6060 100644

Lines of this file are not shown. View the raw message.

backends/cryptodev-builtin.c +8 -7
index 657c0ba2f3..fe644633ac 100644

Lines of this file are not shown. View the raw message.

backends/cryptodev.c +9 -9
index 03a78f269f..4bca763e58 100644

Lines of this file are not shown. View the raw message.

backends/hostmem-file.c +6 -5
index fc4ef46d11..8da1cf3c14 100644

Lines of this file are not shown. View the raw message.

backends/hostmem-ram.c +1 -1
index 04a7ac362b..9f0472b937 100644

Lines of this file are not shown. View the raw message.

backends/hostmem.c +22 -17
index 8fcc5d68c9..6ff73a3d86 100644

Lines of this file are not shown. View the raw message.

backends/rng-egd.c +4 -3
index 8c2acae177..3a8ac2cf7d 100644

Lines of this file are not shown. View the raw message.

backends/rng-random.c +3 -3
index 029f6b9b01..eaf91d9b5a 100644

Lines of this file are not shown. View the raw message.

backends/rng.c +4 -3
index c5f4f01642..73191bddd2 100644

Lines of this file are not shown. View the raw message.

backends/tpm.c +4 -3
index 5b9788faf4..05a3303305 100644

Lines of this file are not shown. View the raw message.

balloon.c +3 -3
index 1d720fff81..a9ed1ebde6 100644

Lines of this file are not shown. View the raw message.

block.c +57 -46

103 lines not on this page · raw message

block/backup.c +4 -3
index 6976129e7d..5e5d45c5a1 100644

Lines of this file are not shown. View the raw message.

block/blkdebug.c +10 -7
index 57cd23d94a..f6ff0e7b38 100644

Lines of this file are not shown. View the raw message.

block/blkreplay.c +1 -1
index 6aa5fd4156..f28de446a7 100755

Lines of this file are not shown. View the raw message.

block/blkverify.c +2 -2
index 6b0a603cf0..78adc24a76 100644

Lines of this file are not shown. View the raw message.

block/block-backend.c +13 -9
index 0725cd84a4..1fab9ec0b0 100644

Lines of this file are not shown. View the raw message.

block/bochs.c +2 -2
index a759b6eff0..be02ab4b34 100644

Lines of this file are not shown. View the raw message.

block/cloop.c +2 -2
index d6597fcf78..981c6e23b0 100644

Lines of this file are not shown. View the raw message.

block/commit.c +3 -2
index 08ab3ce7de..4c2354359f 100644

Lines of this file are not shown. View the raw message.

block/crypto.c +10 -10
index d98ae60c48..69a6601b8f 100644

Lines of this file are not shown. View the raw message.

block/curl.c +2 -2
index 05ed2e82c6..5c67b40545 100644

Lines of this file are not shown. View the raw message.

block/dirty-bitmap.c +5 -4
index 519737c8d3..50d26a74dc 100644

Lines of this file are not shown. View the raw message.

block/dmg.c +3 -3
index 900ae5a678..d911a61291 100644

Lines of this file are not shown. View the raw message.

block/file-posix.c +23 -19

42 lines not on this page · raw message

block/file-win32.c +10 -8
index ef2910b03f..ae83637dde 100644

Lines of this file are not shown. View the raw message.

block/gluster.c +8 -7
index 30ac978a89..432e2a7f63 100644

Lines of this file are not shown. View the raw message.

block/io.c +1 -1
index cc3fd997a7..43faf4085d 100644

Lines of this file are not shown. View the raw message.

block/iscsi.c +15 -11
index 6b3939585c..8359479a20 100644

Lines of this file are not shown. View the raw message.

block/mirror.c +7 -5
index addafec0ee..6007fc1293 100644

Lines of this file are not shown. View the raw message.

block/nbd-client.c +1 -1
index ac3f735d27..6d1012cc73 100644

Lines of this file are not shown. View the raw message.

block/nbd.c +10 -8
index 6644c0e75f..8b02e8ab5e 100644

Lines of this file are not shown. View the raw message.

block/nfs.c +15 -10
index 7792b3ad01..1aaec98ebc 100644

Lines of this file are not shown. View the raw message.

block/null.c +2 -2
index 876f90965b..d9ed68a3f6 100644

Lines of this file are not shown. View the raw message.

block/parallels.c +3 -2
index d4125a6220..506341853d 100644

Lines of this file are not shown. View the raw message.

block/qapi.c +7 -6
index 423934f0bf..e4c95912e8 100644

Lines of this file are not shown. View the raw message.

block/qcow.c +5 -4
index 13d7842db3..df81e9450a 100644

Lines of this file are not shown. View the raw message.

block/qcow2-cluster.c +1 -1
index d779ea19cf..3133901fc8 100644

Lines of this file are not shown. View the raw message.

block/qcow2-refcount.c +4 -4
index 7c06061aae..b6c840cc99 100644

Lines of this file are not shown. View the raw message.

block/qcow2-snapshot.c +2 -2
index 44243e0e95..62ecd1327b 100644

Lines of this file are not shown. View the raw message.

block/qcow2.c +17 -12
index 5e7e5bf292..7f7ee7a7a9 100644

Lines of this file are not shown. View the raw message.

block/qed.c +13 -8
index 8d899fd479..86fc1fbc1a 100644

Lines of this file are not shown. View the raw message.

block/quorum.c +5 -4
index ab9f253c96..7e38e197de 100644

Lines of this file are not shown. View the raw message.

block/raw-format.c +8 -6
index 5134373fbf..39ee2cc817 100644

Lines of this file are not shown. View the raw message.

block/rbd.c +13 -10
index 25149e776b..16f07da6f3 100644

Lines of this file are not shown. View the raw message.

block/replication.c +15 -11
index c7ea016af9..552c5d22f8 100644

Lines of this file are not shown. View the raw message.

block/sheepdog.c +17 -16
index 6160fa6717..eca6f29419 100644

Lines of this file are not shown. View the raw message.

block/snapshot.c +6 -6
index 244fdc2bb6..4f50409edd 100644

Lines of this file are not shown. View the raw message.

block/ssh.c +19 -12
index 008e256ad1..3c6e140763 100644

Lines of this file are not shown. View the raw message.

block/stream.c +4 -2
index 826783635a..e084585eff 100644

Lines of this file are not shown. View the raw message.

block/vdi.c +4 -3
index 79af47763b..a385ba4a94 100644

Lines of this file are not shown. View the raw message.

block/vhdx-log.c +1 -1
index 906d5439fb..5ca149527e 100644

Lines of this file are not shown. View the raw message.

block/vhdx.c +6 -5
index 890afe064b..cc93b21591 100644

Lines of this file are not shown. View the raw message.

block/vmdk.c +18 -15
index 55581b03fe..0adf212ace 100644

Lines of this file are not shown. View the raw message.

block/vpc.c +6 -5
index 4240ba9d1c..edb7f7f672 100644

Lines of this file are not shown. View the raw message.

block/vvfat.c +6 -6
index 426ca70e35..dbbea9e944 100644

Lines of this file are not shown. View the raw message.

block/vxhs.c +3 -3
index 75cc6c8672..35c7608949 100644

Lines of this file are not shown. View the raw message.

block/write-threshold.c +1 -1
index 0bd1a01c86..184addaa5d 100644

Lines of this file are not shown. View the raw message.

blockdev-nbd.c +6 -5
index e7bf14a8ed..53f03d371f 100644

Lines of this file are not shown. View the raw message.

blockdev.c +70 -59

129 lines not on this page · raw message

blockjob.c +10 -8
index c0b528f1e9..3350fa4dee 100644

Lines of this file are not shown. View the raw message.

bootdevice.c +6 -6
index 92f607d321..7a52fb37f7 100644

Lines of this file are not shown. View the raw message.

chardev/baum.c +1 -1
index 302dd9666c..ad96d7196d 100644

Lines of this file are not shown. View the raw message.

chardev/char-console.c +1 -1
index 535ed65136..53510efeb3 100644

Lines of this file are not shown. View the raw message.

chardev/char-fd.c +1 -1
index b0ebccf0c6..d81865f36a 100644

Lines of this file are not shown. View the raw message.

chardev/char-fe.c +2 -2
index 3f90f0567c..1f1f1c9a1d 100644

Lines of this file are not shown. View the raw message.

chardev/char-file.c +2 -2
index a57b88aaf2..ad0808caf4 100644

Lines of this file are not shown. View the raw message.

chardev/char-mux.c +2 -2
index 08570b915e..fba56c1d59 100644

Lines of this file are not shown. View the raw message.

chardev/char-null.c +1 -1
index 90bafe76f4..1c8be78f2c 100644

Lines of this file are not shown. View the raw message.

chardev/char-parallel.c +4 -4
index bce89f8c36..a89b111ffb 100644

Lines of this file are not shown. View the raw message.

chardev/char-pipe.c +4 -4
index 3a95e4c1b2..05f07b46ae 100644

Lines of this file are not shown. View the raw message.

chardev/char-pty.c +1 -1
index 09609d397d..0ceb0e8280 100644

Lines of this file are not shown. View the raw message.

chardev/char-ringbuf.c +4 -4
index df52b04d22..f99a1423d3 100644

Lines of this file are not shown. View the raw message.

chardev/char-serial.c +3 -3
index 2f8f83821d..fcf507b7f2 100644

Lines of this file are not shown. View the raw message.

chardev/char-socket.c +5 -5
index 7ca9863631..6faf32345a 100644

Lines of this file are not shown. View the raw message.

chardev/char-stdio.c +2 -2
index 6f5d798d7b..bd5c06f50b 100644

Lines of this file are not shown. View the raw message.

chardev/char-udp.c +2 -2
index d8766b1fd0..12fde11562 100644

Lines of this file are not shown. View the raw message.

chardev/char-win-stdio.c +1 -1
index efcf7827eb..1cd4c56d90 100644

Lines of this file are not shown. View the raw message.

chardev/char-win.c +2 -1
index 05518e0958..14adf57cda 100644

Lines of this file are not shown. View the raw message.

chardev/char.c +10 -9
index ac3cd2b436..eae1301139 100644

Lines of this file are not shown. View the raw message.

chardev/msmouse.c +1 -1
index 0ffd137ce8..5e7ced5d6a 100644

Lines of this file are not shown. View the raw message.

chardev/spice.c +4 -4
index a312078812..5cc3765e42 100644

Lines of this file are not shown. View the raw message.

chardev/wctablet.c +1 -1
index 6c13c2c58a..8adc34794c 100644

Lines of this file are not shown. View the raw message.

cpus.c +6 -6
index 14bb8d552e..4b48ed2652 100644

Lines of this file are not shown. View the raw message.

crypto/afsplit.c +3 -3
index 825e2cff26..56a59386bb 100644

Lines of this file are not shown. View the raw message.

crypto/block-luks.c +11 -11
index 2b97d89a69..dd155ee42b 100644

Lines of this file are not shown. View the raw message.

crypto/block-qcow.c +5 -5
index be88c6f0ef..61b91cde53 100644

Lines of this file are not shown. View the raw message.

crypto/block.c +7 -7
index 64c8420425..f4fb725fd2 100644

Lines of this file are not shown. View the raw message.

crypto/cipher-builtin.c +12 -12
index b4bc2b9ca6..52cf847ea8 100644

Lines of this file are not shown. View the raw message.

crypto/cipher-gcrypt.c +4 -4
index 6487ecaf37..10eccc50e4 100644

Lines of this file are not shown. View the raw message.

crypto/cipher-nettle.c +4 -4
index dfc9030227..44a230fcd4 100644

Lines of this file are not shown. View the raw message.

crypto/cipher.c +1 -1
index 5a9648942f..1862c267e9 100644

Lines of this file are not shown. View the raw message.

crypto/hash-gcrypt.c +1 -1
index 7690690f70..d1916bd828 100644

Lines of this file are not shown. View the raw message.

crypto/hash-glib.c +1 -1
index ec99ac9df9..5ca293b3de 100644

Lines of this file are not shown. View the raw message.

crypto/hash-nettle.c +1 -1
index 6a206dcb18..4c13f463fd 100644

Lines of this file are not shown. View the raw message.

crypto/hash.c +5 -5
index 0f1ceac66a..a2f5c42295 100644

Lines of this file are not shown. View the raw message.

crypto/hmac-gcrypt.c +2 -2
index 21189e694f..d0c7e8dece 100644

Lines of this file are not shown. View the raw message.

crypto/hmac-glib.c +4 -4
index 08a1fdd10a..38f69dfd5b 100644

Lines of this file are not shown. View the raw message.

crypto/hmac-nettle.c +2 -2
index 4a9e6b2c7d..ac8b8ca30d 100644

Lines of this file are not shown. View the raw message.

crypto/hmac.c +3 -3
index 5750405cfb..046b8c616c 100644

Lines of this file are not shown. View the raw message.

crypto/init.c +1 -1
index f131c42306..574dc29e57 100644

Lines of this file are not shown. View the raw message.

crypto/ivgen-essiv.c +2 -2
index cba20bde6c..08817038b8 100644

Lines of this file are not shown. View the raw message.

crypto/ivgen-plain.c +2 -2
index 9b9b4ad0bf..786b7897ba 100644

Lines of this file are not shown. View the raw message.

crypto/ivgen-plain64.c +2 -2
index 6c6b1b44c3..73d60c1e86 100644

Lines of this file are not shown. View the raw message.

crypto/ivgen.c +2 -2
index f66435112b..a5c667350e 100644

Lines of this file are not shown. View the raw message.

crypto/pbkdf-gcrypt.c +1 -1
index 40289858bf..6bff786350 100644

Lines of this file are not shown. View the raw message.

crypto/pbkdf-nettle.c +1 -1
index 6fb2671656..5c52dec87d 100644

Lines of this file are not shown. View the raw message.

crypto/pbkdf-stub.c +1 -1
index a15044da42..7adbaa3e79 100644

Lines of this file are not shown. View the raw message.

crypto/pbkdf.c +2 -2
index f22e71d183..964215eb2c 100644

Lines of this file are not shown. View the raw message.

crypto/random-gcrypt.c +2 -2
index 9f1c9ee60e..b1ecceef61 100644

Lines of this file are not shown. View the raw message.

crypto/random-gnutls.c +2 -2
index 5350003a0b..ef740ddaeb 100644

Lines of this file are not shown. View the raw message.

crypto/random-platform.c +2 -2
index 92eed0ee78..e53d0dcf89 100644

Lines of this file are not shown. View the raw message.

crypto/secret.c +19 -19
index e5631b9dd2..3e86b18663 100644

Lines of this file are not shown. View the raw message.

crypto/tlscreds.c +10 -10
index 21bd388769..55ee7af473 100644

Lines of this file are not shown. View the raw message.

crypto/tlscredsanon.c +6 -6
index ad6f331aca..9c33c3d8e5 100644

Lines of this file are not shown. View the raw message.

crypto/tlscredsx509.c +19 -19
index f4dc85cb75..b310660508 100644

Lines of this file are not shown. View the raw message.

crypto/tlssession.c +9 -9
index 96a02deb69..a32d831870 100644

Lines of this file are not shown. View the raw message.

device_tree.c +5 -3
index a24ddff02b..2bfc2957a8 100644

Lines of this file are not shown. View the raw message.

dump.c +27 -25

52 lines not on this page · raw message

exec.c +11 -9
index 35d9588350..9a9169d7ca 100644

Lines of this file are not shown. View the raw message.

fsdev/qemu-fsdev-throttle.c +2 -1
index 7ae4e86646..22b6b57a9d 100644

Lines of this file are not shown. View the raw message.

gdbstub.c +1 -1
index ec4e4b25be..fe480b47bb 100644

Lines of this file are not shown. View the raw message.

hw/9pfs/9p.c +2 -2
index 96d2683348..fff8fa90a2 100644

Lines of this file are not shown. View the raw message.

hw/9pfs/virtio-9p-device.c +4 -3
index 245abd8aae..99dfc3d886 100644

Lines of this file are not shown. View the raw message.

hw/acpi/acpi-stub.c +1 -1
index 26bd22f7ec..26d3185f72 100644

Lines of this file are not shown. View the raw message.

hw/acpi/core.c +3 -3
index 95fcac95a2..8669a8da6d 100644

Lines of this file are not shown. View the raw message.

hw/acpi/cpu.c +4 -3
index 6dc138db89..f85facdda7 100644

Lines of this file are not shown. View the raw message.

hw/acpi/cpu_hotplug.c +3 -2
index c72a748bb3..e1ee4636fe 100644

Lines of this file are not shown. View the raw message.

hw/acpi/ich9.c +20 -17
index 54e422a39f..e4861cf8d6 100644

Lines of this file are not shown. View the raw message.

hw/acpi/memory_hotplug.c +4 -4
index f4b6a096c0..7444c7c085 100644

Lines of this file are not shown. View the raw message.

hw/acpi/pcihp.c +2 -2
index 2b0f3e1bfb..42426ceb4a 100644

Lines of this file are not shown. View the raw message.

hw/acpi/piix4.c +8 -6
index f3c5f03d35..cac9623a0d 100644

Lines of this file are not shown. View the raw message.

hw/acpi/vmgenid.c +4 -3
index 5bc495960c..e6380176d5 100644

Lines of this file are not shown. View the raw message.

hw/arm/allwinner-a10.c +1 -1
index 7d9c8691bb..e7d51935c8 100644

Lines of this file are not shown. View the raw message.

hw/arm/armv7m.c +2 -2
index 2fa8bbb249..cf7cdd26b9 100644

Lines of this file are not shown. View the raw message.

hw/arm/aspeed.c +2 -2
index e824ea87a9..eaaec43021 100644

Lines of this file are not shown. View the raw message.

hw/arm/aspeed_soc.c +1 -1
index d546b6af91..585ec239fb 100644

Lines of this file are not shown. View the raw message.

hw/arm/bcm2835_peripherals.c +2 -1
index 447870b5a7..8280a17a3a 100644

Lines of this file are not shown. View the raw message.

hw/arm/bcm2836.c +1 -1
index 2c6a082395..ec0bbdb3a5 100644

Lines of this file are not shown. View the raw message.

hw/arm/digic.c +1 -1
index eeaa8729ff..15bf47510f 100644

Lines of this file are not shown. View the raw message.

hw/arm/fsl-imx25.c +1 -1
index c10f96d83c..9c6667adf2 100644

Lines of this file are not shown. View the raw message.

hw/arm/fsl-imx31.c +1 -1
index 0cc80f3aee..181ee404c7 100644

Lines of this file are not shown. View the raw message.

hw/arm/fsl-imx6.c +1 -1
index 1bdf9dbd70..f7ae56d39b 100644

Lines of this file are not shown. View the raw message.

hw/arm/integratorcp.c +1 -1
index 5af0d7fe5b..917ab3899b 100644

Lines of this file are not shown. View the raw message.

hw/arm/musicpal.c +2 -2
index 9c710f74b4..aab4449f73 100644

Lines of this file are not shown. View the raw message.

hw/arm/pxa2xx.c +1 -1
index 629e6c64e6..0239068342 100644

Lines of this file are not shown. View the raw message.

hw/arm/pxa2xx_gpio.c +1 -1
index 521dbad039..e40c35a942 100644

Lines of this file are not shown. View the raw message.

hw/arm/spitz.c +2 -2
index 93bde14743..bb52342196 100644

Lines of this file are not shown. View the raw message.

hw/arm/stm32f205_soc.c +1 -1
index 6e1260d2ed..50961aa252 100644

Lines of this file are not shown. View the raw message.

hw/arm/strongarm.c +1 -1
index 7683edc9e5..43e0048517 100644

Lines of this file are not shown. View the raw message.

hw/arm/tosa.c +1 -1
index 2421b8150d..3b43fa2e60 100644

Lines of this file are not shown. View the raw message.

hw/arm/vexpress.c +3 -2
index d1e294f969..ec779d9f58 100644

Lines of this file are not shown. View the raw message.

hw/arm/virt.c +11 -10
index 4c187bba59..81a7a4bbf7 100644

Lines of this file are not shown. View the raw message.

hw/arm/xlnx-zynqmp.c +2 -2
index ee6c64b409..42f9cf396f 100644

Lines of this file are not shown. View the raw message.

hw/arm/z2.c +1 -1
index 1607cbdb03..91fa782cc6 100644

Lines of this file are not shown. View the raw message.

hw/audio/ac97.c +1 -1
index 959c786261..84889fd4fe 100644

Lines of this file are not shown. View the raw message.

hw/audio/adlib.c +1 -1
index c6e0f10c16..8870fe706d 100644

Lines of this file are not shown. View the raw message.

hw/audio/cs4231a.c +1 -1
index 096e8e98d7..2a1bc2aa16 100644

Lines of this file are not shown. View the raw message.

hw/audio/es1370.c +1 -1
index dd7c23d185..bec992255e 100644

Lines of this file are not shown. View the raw message.

hw/audio/gus.c +1 -1
index 3e864cd36d..e894365592 100644

Lines of this file are not shown. View the raw message.

hw/audio/intel-hda.c +3 -3
index 06acc98f7b..b11e55ac5d 100644

Lines of this file are not shown. View the raw message.

hw/audio/marvell_88w8618.c +1 -1
index 4f65f8c199..0c2657bedd 100644

Lines of this file are not shown. View the raw message.

hw/audio/milkymist-ac97.c +1 -1
index bc8db71ae0..d33072979a 100644

Lines of this file are not shown. View the raw message.

hw/audio/pcspk.c +1 -1
index f643b122bb..67ca88f5e1 100644

Lines of this file are not shown. View the raw message.

hw/audio/pl041.c +1 -1
index c8cc503236..ce03d3b602 100644

Lines of this file are not shown. View the raw message.

hw/audio/sb16.c +1 -1
index 6ab2f6f89a..bc9e066cf9 100644

Lines of this file are not shown. View the raw message.

hw/block/block.c +2 -2
index 27878d0087..bf13eb37fd 100644

Lines of this file are not shown. View the raw message.

hw/block/dataplane/virtio-blk.c +1 -1
index 5556f0e64e..7d859e35a9 100644

Lines of this file are not shown. View the raw message.

hw/block/fdc.c +5 -5
index 597ea719a7..d246858787 100644

Lines of this file are not shown. View the raw message.

hw/block/m25p80.c +1 -1
index 190573cefa..2182855f66 100644

Lines of this file are not shown. View the raw message.

hw/block/nand.c +1 -1
index 0d33ac281f..a2b6437d96 100644

Lines of this file are not shown. View the raw message.

hw/block/pflash_cfi01.c +1 -1
index e634b128ce..caa6650513 100644

Lines of this file are not shown. View the raw message.

hw/block/pflash_cfi02.c +1 -1
index 2ef8c76b94..391024ce0e 100644

Lines of this file are not shown. View the raw message.

hw/block/virtio-blk.c +4 -3
index 11455faebc..389cd59421 100644

Lines of this file are not shown. View the raw message.

hw/bt/hci-csr.c +1 -1
index d13192b9b5..c9732775e0 100644

Lines of this file are not shown. View the raw message.

hw/char/bcm2835_aux.c +1 -1
index 4d46ad60ae..b5d1bfa8f9 100644

Lines of this file are not shown. View the raw message.

hw/char/cadence_uart.c +1 -1
index 4a2c124104..7aa4e091f0 100644

Lines of this file are not shown. View the raw message.

hw/char/debugcon.c +2 -2
index 90e437edfb..fd97488501 100644

Lines of this file are not shown. View the raw message.

hw/char/digic-uart.c +1 -1
index 34306e11ff..ee353d1b90 100644

Lines of this file are not shown. View the raw message.

hw/char/escc.c +1 -1
index 3f787632c7..ffd24cba71 100644

Lines of this file are not shown. View the raw message.

hw/char/etraxfs_ser.c +1 -1
index c1fba9f50f..2574d024c8 100644

Lines of this file are not shown. View the raw message.

hw/char/exynos4210_uart.c +1 -1
index b51d44a321..77efa81781 100644

Lines of this file are not shown. View the raw message.

hw/char/imx_serial.c +1 -1
index af250305be..f410453273 100644

Lines of this file are not shown. View the raw message.

hw/char/ipoctal232.c +1 -1
index 337a3e566a..ee90bf1cdb 100644

Lines of this file are not shown. View the raw message.

hw/char/lm32_juart.c +1 -1
index 3948dcd332..811e206009 100644

Lines of this file are not shown. View the raw message.

hw/char/lm32_uart.c +1 -1
index cff8c38f90..ffe951fa47 100644

Lines of this file are not shown. View the raw message.

hw/char/mcf_uart.c +1 -1
index fe12ad5ccb..a7677bd485 100644

Lines of this file are not shown. View the raw message.

hw/char/milkymist-uart.c +1 -1
index e19d0f6520..e4b7e05ed3 100644

Lines of this file are not shown. View the raw message.

hw/char/parallel.c +1 -1
index 75a1a2f55e..711e12e1fb 100644

Lines of this file are not shown. View the raw message.

hw/char/pl011.c +1 -1
index 33802f00c8..c4946b3874 100644

Lines of this file are not shown. View the raw message.

hw/char/serial-isa.c +1 -1
index d7c5cc11fe..72525ba146 100644

Lines of this file are not shown. View the raw message.

hw/char/serial-pci.c +2 -2
index 60074eb114..9c599bf166 100644

Lines of this file are not shown. View the raw message.

hw/char/serial.c +1 -1
index e1f12507bf..c0625b3481 100644

Lines of this file are not shown. View the raw message.

hw/char/spapr_vty.c +1 -1
index 8f02f3a612..4947d8dcd6 100644

Lines of this file are not shown. View the raw message.

hw/char/stm32f2xx_usart.c +1 -1
index 59872e6d3b..244d173c14 100644

Lines of this file are not shown. View the raw message.

hw/char/terminal3270.c +1 -1
index 7b10a04f18..9d13a57ff2 100644

Lines of this file are not shown. View the raw message.

hw/char/virtio-console.c +2 -2
index 0cb1668c8a..5feeea0b4d 100644

Lines of this file are not shown. View the raw message.

hw/char/virtio-serial-bus.c +10 -6
index 8f0d130d49..a0a85b9332 100644

Lines of this file are not shown. View the raw message.

hw/char/xilinx_uartlite.c +1 -1
index 71ed2fc1be..e7a6e048b0 100644

Lines of this file are not shown. View the raw message.

hw/core/bus.c +6 -5
index ab1925bee9..fc9133049f 100644

Lines of this file are not shown. View the raw message.

hw/core/generic-loader.c +2 -2
index 46012673c3..01f20d5a1f 100644

Lines of this file are not shown. View the raw message.

hw/core/hotplug.c +4 -4
index 17ac986685..1390611be3 100644

Lines of this file are not shown. View the raw message.

hw/core/loader.c +2 -1
index f72930ca4a..ac6deb1f63 100644

Lines of this file are not shown. View the raw message.

hw/core/machine.c +51 -36

87 lines not on this page · raw message

hw/core/nmi.c +1 -1
index bfd0896daf..948a9e09cf 100644

Lines of this file are not shown. View the raw message.

hw/core/or-irq.c +1 -1
index f9d76c4641..cd4f0ddf7a 100644

Lines of this file are not shown. View the raw message.

hw/core/platform-bus.c +1 -1
index d3286e6570..c967bc95da 100644

Lines of this file are not shown. View the raw message.

hw/core/qdev-properties-system.c +12 -12
index 68c97c08dc..c6e4d5d46c 100644

Lines of this file are not shown. View the raw message.

hw/core/qdev-properties.c +32 -31

63 lines not on this page · raw message

hw/core/qdev.c +12 -11
index cd95d8ce63..cedb933a0a 100644

Lines of this file are not shown. View the raw message.

hw/cpu/a15mpcore.c +1 -1
index e9f5caee7d..b4eae63b0f 100644

Lines of this file are not shown. View the raw message.

hw/cpu/a9mpcore.c +1 -1
index b32fbb7a44..a26228c9c8 100644

Lines of this file are not shown. View the raw message.

hw/cpu/arm11mpcore.c +1 -1
index 60336b1c0a..e847fde273 100644

Lines of this file are not shown. View the raw message.

hw/cpu/core.c +4 -4
index a10e655d32..2bf05dcdc0 100644

Lines of this file are not shown. View the raw message.

hw/cpu/realview_mpcore.c +1 -1
index be5fad6d74..6a222ae7cf 100644

Lines of this file are not shown. View the raw message.

hw/display/ads7846.c +1 -1
index 166edade7d..a0b87408b8 100644

Lines of this file are not shown. View the raw message.

hw/display/bcm2835_fb.c +1 -1
index 7eab927652..33769ef11d 100644

Lines of this file are not shown. View the raw message.

hw/display/cg3.c +1 -1
index 1de15a1d34..487ef7e769 100644

Lines of this file are not shown. View the raw message.

hw/display/cirrus_vga.c +2 -2
index afc290ab91..984b578fa7 100644

Lines of this file are not shown. View the raw message.

hw/display/exynos4210_fimd.c +1 -1
index fd0b2bec65..1c887442c8 100644

Lines of this file are not shown. View the raw message.

hw/display/jazz_led.c +1 -1
index 3c97d56434..b38296c7eb 100644

Lines of this file are not shown. View the raw message.

hw/display/milkymist-tmu2.c +1 -1
index 59120ddb67..f84494a408 100644

Lines of this file are not shown. View the raw message.

hw/display/milkymist-vgafb.c +1 -1
index 177fdac7d8..ad1d7eba41 100644

Lines of this file are not shown. View the raw message.

hw/display/pl110.c +1 -1
index 8c7dcc6f0a..9be0aa24fd 100644

Lines of this file are not shown. View the raw message.

hw/display/qxl.c +3 -3
index 0013b29ca5..49546be0eb 100644

Lines of this file are not shown. View the raw message.

hw/display/sm501.c +2 -2
index 9d254ef2e1..9874772383 100644

Lines of this file are not shown. View the raw message.

hw/display/ssd0323.c +1 -1
index e182893157..459008f2b7 100644

Lines of this file are not shown. View the raw message.

hw/display/tcx.c +1 -1
index 6593c1d6af..4c801de5e5 100644

Lines of this file are not shown. View the raw message.

hw/display/vga-isa.c +1 -1
index 1af95562f2..9ecd584899 100644

Lines of this file are not shown. View the raw message.

hw/display/vga-pci.c +5 -4
index 950fa207b5..f3e0541211 100644

Lines of this file are not shown. View the raw message.

hw/display/virtio-gpu-pci.c +2 -1
index ef92c4ad6f..83fddfbca4 100644

Lines of this file are not shown. View the raw message.

hw/display/virtio-gpu.c +5 -3
index 9c8ecd2d87..470d2b62e0 100644

Lines of this file are not shown. View the raw message.

hw/display/virtio-vga.c +2 -1
index f18484e333..b6b5ec64ef 100644

Lines of this file are not shown. View the raw message.

hw/display/vmware_vga.c +1 -1
index ec5f27d67e..5d288328c4 100644

Lines of this file are not shown. View the raw message.

hw/display/xlnx_dp.c +2 -2
index f7b7b80c68..96013aef27 100644

Lines of this file are not shown. View the raw message.

hw/dma/bcm2835_dma.c +1 -1
index 5d144a2633..43bf537b5f 100644

Lines of this file are not shown. View the raw message.

hw/dma/i82374.c +1 -1
index 6c0f975df0..d00336c84d 100644

Lines of this file are not shown. View the raw message.

hw/dma/i8257.c +1 -1
index bd23e893bf..2be3a71de3 100644

Lines of this file are not shown. View the raw message.

hw/dma/pl330.c +1 -1
index 32cf8399b8..007621a844 100644

Lines of this file are not shown. View the raw message.

hw/dma/pxa2xx_dma.c +1 -1
index 634a4328f0..80576f89f9 100644

Lines of this file are not shown. View the raw message.

hw/dma/rc4030.c +2 -2
index edf9432051..356b07fb1f 100644

Lines of this file are not shown. View the raw message.

hw/dma/sparc32_dma.c +1 -1
index eb491b50ca..86eeb66eb9 100644

Lines of this file are not shown. View the raw message.

hw/dma/xilinx_axidma.c +1 -1
index 3987b5ff96..a6b299c50b 100644

Lines of this file are not shown. View the raw message.

hw/gpio/bcm2835_gpio.c +1 -1
index acc2e3cf9e..7622aa07f5 100644

Lines of this file are not shown. View the raw message.

hw/gpio/gpio_key.c +1 -1
index b34aa49dfb..d7e4186e49 100644

Lines of this file are not shown. View the raw message.

hw/gpio/imx_gpio.c +1 -1
index c36c394fda..ead1ff2ec6 100644

Lines of this file are not shown. View the raw message.

hw/gpio/omap_gpio.c +2 -2
index 1df394eb12..83181a1153 100644

Lines of this file are not shown. View the raw message.

hw/i2c/aspeed_i2c.c +1 -1
index c762c7366a..4545fed5f0 100644

Lines of this file are not shown. View the raw message.

hw/i2c/imx_i2c.c +1 -1
index 6c81b98ebd..1331260745 100644

Lines of this file are not shown. View the raw message.

hw/i2c/omap_i2c.c +1 -1
index f6e80bee25..352d7c94d1 100644

Lines of this file are not shown. View the raw message.

hw/i2c/smbus_ich9.c +1 -1
index ea51e09186..e4f0f23d84 100644

Lines of this file are not shown. View the raw message.

hw/i386/amd_iommu.c +1 -1
index 7b6d4ea3f3..3aba398d31 100644

Lines of this file are not shown. View the raw message.

hw/i386/intel_iommu.c +2 -2
index 15610b9de8..c1db89be67 100644

Lines of this file are not shown. View the raw message.

hw/i386/kvm/apic.c +2 -2
index 1df6d26816..ec06d28e9c 100644

Lines of this file are not shown. View the raw message.

hw/i386/kvm/clock.c +1 -1
index 363d1b5743..7454163a7e 100644

Lines of this file are not shown. View the raw message.

hw/i386/kvm/i8254.c +1 -1
index 521a58498a..3b458276fb 100644

Lines of this file are not shown. View the raw message.

hw/i386/kvm/i8259.c +1 -1
index 11d1b726b6..b5ef982283 100644

Lines of this file are not shown. View the raw message.

hw/i386/kvm/ioapic.c +1 -1
index 98ca480792..fb9fc2908a 100644

Lines of this file are not shown. View the raw message.

hw/i386/kvm/pci-assign.c +11 -10
index 194ebb70f3..47ab2aa43a 100644

Lines of this file are not shown. View the raw message.

hw/i386/kvmvapic.c +1 -1
index 82a49556af..cf02933e3a 100644

Lines of this file are not shown. View the raw message.

hw/i386/pc.c +41 -32

73 lines not on this page · raw message

hw/i386/x86-iommu.c +1 -1
index 293caf83ef..3ca5142e81 100644

Lines of this file are not shown. View the raw message.

hw/i386/xen/xen-hvm.c +2 -2
index 1acd4de405..bf281a1967 100644

Lines of this file are not shown. View the raw message.

hw/i386/xen/xen_apic.c +1 -1
index 55769eba7e..f99779f6cc 100644

Lines of this file are not shown. View the raw message.

hw/i386/xen/xen_platform.c +1 -1
index 1419fc96d2..bffd503de5 100644

Lines of this file are not shown. View the raw message.

hw/i386/xen/xen_pvdevice.c +1 -1
index c093b34458..f712a86fce 100644

Lines of this file are not shown. View the raw message.

hw/ide/ahci.c +1 -1
index f60826d6e0..86cba82270 100644

Lines of this file are not shown. View the raw message.

hw/ide/cmd646.c +1 -1
index 9ebb8d4fb2..e6c4e30bf4 100644

Lines of this file are not shown. View the raw message.

hw/ide/core.c +1 -1
index 0b48b64d3a..117a2e54c6 100644

Lines of this file are not shown. View the raw message.

hw/ide/ich.c +1 -1
index 519d3d5e16..d04e9d9d06 100644

Lines of this file are not shown. View the raw message.

hw/ide/isa.c +1 -1
index 40213d662c..bab1588837 100644

Lines of this file are not shown. View the raw message.

hw/ide/macio.c +1 -1
index 9742c005d1..9cdedc31e9 100644

Lines of this file are not shown. View the raw message.

hw/ide/microdrive.c +1 -1
index e3fd30e457..7d3e009015 100644

Lines of this file are not shown. View the raw message.

hw/ide/mmio.c +1 -1
index 6f12f456ed..e266a802f2 100644

Lines of this file are not shown. View the raw message.

hw/ide/piix.c +1 -1
index 7e2d76705d..bc2fdb9782 100644

Lines of this file are not shown. View the raw message.

hw/ide/qdev.c +4 -4
index efa34e429a..68233a1a50 100644

Lines of this file are not shown. View the raw message.

hw/ide/via.c +1 -1
index 5b32ecb386..a6bdb639c1 100644

Lines of this file are not shown. View the raw message.

hw/input/adb.c +3 -3
index 43d3205472..48ac0fde4e 100644

Lines of this file are not shown. View the raw message.

hw/input/pckbd.c +1 -1
index c479f827b6..568741feef 100644

Lines of this file are not shown. View the raw message.

hw/input/virtio-input-hid.c +3 -2
index ad1beb3b0b..dbaa71b67d 100644

Lines of this file are not shown. View the raw message.

hw/input/virtio-input-host.c +3 -2
index cb79e80024..6e5f9ef2bf 100644

Lines of this file are not shown. View the raw message.

hw/input/virtio-input.c +5 -3
index beb38528bd..1d259d7df1 100644

Lines of this file are not shown. View the raw message.

hw/input/vmmouse.c +1 -1
index 4747da9a8d..0d4e0553fb 100644

Lines of this file are not shown. View the raw message.

hw/intc/apic.c +2 -2
index fe15fb6024..3f3e083838 100644

Lines of this file are not shown. View the raw message.

hw/intc/apic_common.c +4 -4
index 536cbad4d0..02b5a81f88 100644

Lines of this file are not shown. View the raw message.

hw/intc/arm_gic.c +1 -1
index aa01bac522..5e7ab0784b 100644

Lines of this file are not shown. View the raw message.

hw/intc/arm_gic_common.c +1 -1
index 70f1134823..73560aaf97 100644

Lines of this file are not shown. View the raw message.

hw/intc/arm_gic_kvm.c +1 -1
index 00f1b704be..543f1cfdea 100644

Lines of this file are not shown. View the raw message.

hw/intc/arm_gicv2m.c +1 -1
index 3922fbc1c1..707e4fe34c 100644

Lines of this file are not shown. View the raw message.

hw/intc/arm_gicv3.c +1 -1
index 1dd941fef3..56ad8e14be 100644

Lines of this file are not shown. View the raw message.

hw/intc/arm_gicv3_common.c +1 -1
index 3fcd6dfaa9..e5ab078292 100644

Lines of this file are not shown. View the raw message.

hw/intc/arm_gicv3_its_kvm.c +1 -1
index edeb4334d1..e0fa1ca972 100644

Lines of this file are not shown. View the raw message.

hw/intc/arm_gicv3_kvm.c +1 -1
index 21e86edb17..e5e01b8403 100644

Lines of this file are not shown. View the raw message.

hw/intc/armv7m_nvic.c +1 -1
index 7795c0623f..491a257877 100644

Lines of this file are not shown. View the raw message.

hw/intc/aspeed_vic.c +1 -1
index 2370e7485f..7fe079e71a 100644

Lines of this file are not shown. View the raw message.

hw/intc/exynos4210_gic.c +2 -1
index 2a55817b76..e411a91456 100644

Lines of this file are not shown. View the raw message.

hw/intc/grlib_irqmp.c +1 -1
index 94659ee256..0a9498cb1c 100644

Lines of this file are not shown. View the raw message.

hw/intc/i8259.c +1 -1
index fe9ecd6bd4..7bd6c3d092 100644

Lines of this file are not shown. View the raw message.

hw/intc/i8259_common.c +1 -1
index c2fd563b5b..47f1ec25f9 100644

Lines of this file are not shown. View the raw message.

hw/intc/ioapic.c +1 -1
index 37c4386ae3..7479d89061 100644

Lines of this file are not shown. View the raw message.

hw/intc/ioapic_common.c +1 -1
index 97c4f9c2df..b9f9035860 100644

Lines of this file are not shown. View the raw message.

hw/intc/mips_gic.c +1 -1
index 15e6e40f9f..f821701993 100644

Lines of this file are not shown. View the raw message.

hw/intc/nios2_iic.c +1 -1
index 016426f964..6ed48f7fc6 100644

Lines of this file are not shown. View the raw message.

hw/intc/omap_intc.c +2 -2
index ccdda89dab..d4824b6a29 100644

Lines of this file are not shown. View the raw message.

hw/intc/openpic.c +1 -1
index f966d0604a..a801248537 100644

Lines of this file are not shown. View the raw message.

hw/intc/openpic_kvm.c +1 -1
index 0518e017c4..0786ab4a95 100644

Lines of this file are not shown. View the raw message.

hw/intc/realview_gic.c +1 -1
index 1b114e7065..ca3e54edeb 100644

Lines of this file are not shown. View the raw message.

hw/intc/s390_flic.c +1 -1
index cc14ddc4bd..90be2eb552 100644

Lines of this file are not shown. View the raw message.

hw/intc/s390_flic_kvm.c +1 -1
index 4ee59628d0..ecd803fb7f 100644

Lines of this file are not shown. View the raw message.

hw/intc/xics.c +4 -4
index ea3516794a..74536c0c0b 100644

Lines of this file are not shown. View the raw message.

hw/intc/xics_kvm.c +4 -4
index 14b8f6f6e4..49f3e943e3 100644

Lines of this file are not shown. View the raw message.

hw/intc/xics_pnv.c +1 -1
index 12ae605f10..a00004bdf3 100644

Lines of this file are not shown. View the raw message.

hw/intc/xics_spapr.c +3 -2
index d98ea8b130..b88a239dbc 100644

Lines of this file are not shown. View the raw message.

hw/ipack/ipack.c +2 -2
index e380f4f369..cf7c5e7bfb 100644

Lines of this file are not shown. View the raw message.

hw/ipack/tpci200.c +1 -1
index 4dfa6b33f3..d0bc3e573d 100644

Lines of this file are not shown. View the raw message.

hw/ipmi/ipmi.c +1 -1
index 5dd057cd39..ef5db1b247 100644

Lines of this file are not shown. View the raw message.

hw/ipmi/ipmi_bmc_extern.c +1 -1
index 329b03e17f..a98dbd3c77 100644

Lines of this file are not shown. View the raw message.

hw/ipmi/ipmi_bmc_sim.c +1 -1
index 277c28cb40..8dc71db08b 100644

Lines of this file are not shown. View the raw message.

hw/ipmi/isa_ipmi_bt.c +2 -2
index c7480f5f78..7c1bedf7d9 100644

Lines of this file are not shown. View the raw message.

hw/ipmi/isa_ipmi_kcs.c +2 -2
index 41e3c12b1e..e442f2febf 100644

Lines of this file are not shown. View the raw message.

hw/isa/i82378.c +1 -1
index 4d29a9900c..8f7c8144e1 100644

Lines of this file are not shown. View the raw message.

hw/isa/isa-bus.c +1 -1
index 348e0eab9d..ebed529457 100644

Lines of this file are not shown. View the raw message.

hw/isa/lpc_ich9.c +2 -2
index ffa8f3ba03..49ecf764d8 100644

Lines of this file are not shown. View the raw message.

hw/isa/pc87312.c +1 -1
index 5ce9f0a062..da69d41155 100644

Lines of this file are not shown. View the raw message.

hw/isa/piix4.c +1 -1
index f811eba59d..220d4a88dc 100644

Lines of this file are not shown. View the raw message.

hw/isa/vt82c686.c +4 -4
index 50dc83df77..ad09cf9719 100644

Lines of this file are not shown. View the raw message.

hw/mem/nvdimm.c +3 -3
index 3843eb6110..10793b5d7d 100644

Lines of this file are not shown. View the raw message.

hw/mem/pc-dimm.c +10 -8
index 13f43ab658..ce1cb153be 100644

Lines of this file are not shown. View the raw message.

hw/mips/cps.c +1 -1
index 4ef337d5c4..2842ddebf5 100644

Lines of this file are not shown. View the raw message.

hw/mips/gt64xxx_pci.c +1 -1
index e8b2eef688..93975f766f 100644

Lines of this file are not shown. View the raw message.

hw/misc/applesmc.c +1 -1
index 77fab5b9d2..7e4bc090cf 100644

Lines of this file are not shown. View the raw message.

hw/misc/arm11scu.c +1 -1
index 7042ce11e8..9f4a147ee8 100644

Lines of this file are not shown. View the raw message.

hw/misc/arm_sysctl.c +1 -1
index b20b44ea20..d9386aa694 100644

Lines of this file are not shown. View the raw message.

hw/misc/aspeed_scu.c +1 -1
index 95022d3607..3e4136d5c4 100644

Lines of this file are not shown. View the raw message.

hw/misc/aspeed_sdmc.c +1 -1
index 5f3ac0b6f6..9d9b351a1e 100644

Lines of this file are not shown. View the raw message.

hw/misc/bcm2835_mbox.c +1 -1
index e97cc814af..4b299ce7db 100644

Lines of this file are not shown. View the raw message.

hw/misc/bcm2835_property.c +1 -1
index 70eaafd325..933deb1302 100644

Lines of this file are not shown. View the raw message.

hw/misc/debugexit.c +1 -1
index 84fa1a5b9d..eb00684ab1 100644

Lines of this file are not shown. View the raw message.

hw/misc/eccmemctl.c +1 -1
index bb7cc52b5e..6913da0086 100644

Lines of this file are not shown. View the raw message.

hw/misc/edu.c +2 -2
index 48735517f4..40fd715816 100644

Lines of this file are not shown. View the raw message.

hw/misc/hyperv_testdev.c +1 -1
index dbd7cdda07..3eab6c10af 100644

Lines of this file are not shown. View the raw message.

hw/misc/imx6_src.c +1 -1
index cfb08710fb..44f9e480d4 100644

Lines of this file are not shown. View the raw message.

hw/misc/ivshmem.c +17 -14
index a68342bd0e..e9dde565b7 100644

Lines of this file are not shown. View the raw message.

hw/misc/macio/cuda.c +1 -1
index 008d8bd4d5..563294f1a5 100644

Lines of this file are not shown. View the raw message.

hw/misc/macio/macio.c +4 -4
index c5945b81f7..fc84d67098 100644

Lines of this file are not shown. View the raw message.

hw/misc/max111x.c +2 -2
index 2a277bdb86..7876f6788a 100644

Lines of this file are not shown. View the raw message.

hw/misc/mips_cmgcr.c +1 -1
index a1edb53f95..20b0e6a991 100644

Lines of this file are not shown. View the raw message.

hw/misc/mips_cpc.c +1 -1
index 6d345745f6..d756277abd 100644

Lines of this file are not shown. View the raw message.

hw/misc/mips_itu.c +1 -1
index ef935b51a8..0831aee83b 100644

Lines of this file are not shown. View the raw message.

hw/misc/pc-testdev.c +1 -1
index b81d820084..510931eea3 100644

Lines of this file are not shown. View the raw message.

hw/misc/pci-testdev.c +1 -1
index 7d5990213e..5517800d19 100644

Lines of this file are not shown. View the raw message.

hw/misc/pvpanic.c +1 -1
index 0badd7b0a0..bd07b4e85c 100644

Lines of this file are not shown. View the raw message.

hw/misc/sga.c +1 -1
index 03b006d6f0..191762eff2 100644

Lines of this file are not shown. View the raw message.

hw/misc/tmp105.c +2 -2
index 1b0584d14b..12163425a7 100644

Lines of this file are not shown. View the raw message.

hw/misc/unimp.c +1 -1
index bcbb585888..3f63d3af54 100644

Lines of this file are not shown. View the raw message.

hw/misc/vmport.c +1 -1
index 165500223f..4e690ca6b9 100644

Lines of this file are not shown. View the raw message.

hw/net/allwinner_emac.c +1 -1
index 50e8361e52..7dbbe629fa 100644

Lines of this file are not shown. View the raw message.

hw/net/cadence_gem.c +1 -1
index 3943187572..5fdc51551e 100644

Lines of this file are not shown. View the raw message.

hw/net/dp8393x.c +1 -1
index 5142003d07..068a040a37 100644

Lines of this file are not shown. View the raw message.

hw/net/e1000.c +1 -1
index 4141e7e108..7320b7beec 100644

Lines of this file are not shown. View the raw message.

hw/net/e1000e.c +1 -1
index 34167c0384..4838a68cf8 100644

Lines of this file are not shown. View the raw message.

hw/net/eepro100.c +1 -1
index 663addc758..2d07a2b0a7 100644

Lines of this file are not shown. View the raw message.

hw/net/fsl_etsec/etsec.c +1 -1
index 9da1932970..39c2597f7a 100644

Lines of this file are not shown. View the raw message.

hw/net/ftgmac100.c +1 -1
index 3c36ab9cec..f14d76a67a 100644

Lines of this file are not shown. View the raw message.

hw/net/imx_fec.c +1 -1
index 90e6ee35ba..4589f47533 100644

Lines of this file are not shown. View the raw message.

hw/net/mcf_fec.c +1 -1
index bfa6b4bcce..3fea8754a0 100644

Lines of this file are not shown. View the raw message.

hw/net/ne2000-isa.c +3 -3
index 6065c80f27..7a525d93d9 100644

Lines of this file are not shown. View the raw message.

hw/net/ne2000.c +1 -1
index 2aec2b80b0..4e3ce23d8c 100644

Lines of this file are not shown. View the raw message.

hw/net/pcnet-pci.c +1 -1
index 598b60e0eb..8a382b20c8 100644

Lines of this file are not shown. View the raw message.

hw/net/rocker/qmp-norocker.c +5 -4
index 6acbcdb02b..5f27b044e7 100644

Lines of this file are not shown. View the raw message.

hw/net/rocker/rocker.c +3 -2
index 4f0f6d71e5..e3da533cb8 100644

Lines of this file are not shown. View the raw message.

hw/net/rocker/rocker_of_dpa.c +1 -1
index 9b1e0d2441..78b2e07485 100644

Lines of this file are not shown. View the raw message.

hw/net/rtl8139.c +1 -1
index 04e1044cd6..6c43a7d3d6 100644

Lines of this file are not shown. View the raw message.

hw/net/spapr_llan.c +1 -1
index 3e2a9896eb..c3745e4d6f 100644

Lines of this file are not shown. View the raw message.

hw/net/virtio-net.c +4 -3
index b94c23e7ff..fc5aa32e67 100644

Lines of this file are not shown. View the raw message.

hw/net/vmxnet3.c +2 -2
index 5d8f150e9d..11cb4330bf 100644

Lines of this file are not shown. View the raw message.

hw/net/xilinx_axienet.c +1 -1
index 5ffa739f68..eee37f69f6 100644

Lines of this file are not shown. View the raw message.

hw/net/xilinx_ethlite.c +1 -1
index 35de353b7c..5b948f3b20 100644

Lines of this file are not shown. View the raw message.

hw/nvram/fw_cfg.c +3 -3
index 43118044f1..109c095a0f 100644

Lines of this file are not shown. View the raw message.

hw/nvram/mac_nvram.c +2 -2
index aef80e64df..6f93833f07 100644

Lines of this file are not shown. View the raw message.

hw/nvram/spapr_nvram.c +1 -1
index bc355a4348..28c77250bd 100644

Lines of this file are not shown. View the raw message.

hw/pci-bridge/dec.c +2 -2
index cca93620ac..b7471f97b4 100644

Lines of this file are not shown. View the raw message.

hw/pci-bridge/gen_pcie_root_port.c +1 -1
index 8ebffa8bb0..9082452fee 100644

Lines of this file are not shown. View the raw message.

hw/pci-bridge/ioh3420.c +1 -1
index da4e5bdf04..9b50754d6e 100644

Lines of this file are not shown. View the raw message.

hw/pci-bridge/pci_bridge_dev.c +2 -2
index 5dbd933cc1..c596d3b51b 100644

Lines of this file are not shown. View the raw message.

hw/pci-bridge/pci_expander_bridge.c +6 -4
index 54132c52ad..28e7dd51e5 100644

Lines of this file are not shown. View the raw message.

hw/pci-bridge/pcie_root_port.c +1 -1
index cf3631806f..90158f3942 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/apb.c +2 -2
index 326f5ef024..d0cf801673 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/bonito.c +1 -1
index 89133a9dd3..e2790b50b1 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/gpex.c +1 -1
index e069ba03da..e1b406eef1 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/grackle.c +1 -1
index 2e281f6155..1b5a185c9b 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/piix.c +8 -7
index 98f3810cc6..d1ba1fdb5a 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/ppce500.c +1 -1
index becc0eeb76..bd9fe872db 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/prep.c +2 -2
index f3a8afcd9f..57f4b942a9 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/q35.c +7 -7
index 65eba73939..2e0abf9c22 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/uninorth.c +5 -4
index 6cf5e59f86..9a34313c5a 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/versatile.c +2 -2
index aa1fdf75fd..a9fe27d962 100644

Lines of this file are not shown. View the raw message.

hw/pci-host/xilinx-pcie.c +1 -1
index 0cc54f167d..29e0fbabeb 100644

Lines of this file are not shown. View the raw message.

hw/pci/msi.c +1 -1
index a87b2278a3..4a3fdae4a5 100644

Lines of this file are not shown. View the raw message.

hw/pci/msix.c +2 -2
index fc5fe511b3..c247402785 100644

Lines of this file are not shown. View the raw message.

hw/pci/pci-stub.c +1 -1
index 36d2c430c5..94c5c62012 100644

Lines of this file are not shown. View the raw message.

hw/pci/pci.c +13 -11
index 4e25eee0ad..53852e4af2 100644

Lines of this file are not shown. View the raw message.

hw/pci/pcie.c +5 -3
index 15bd92086c..6c89ce10ec 100644

Lines of this file are not shown. View the raw message.

hw/pci/pcie_aer.c +1 -1
index 828052b0c0..52ec70e5e7 100644

Lines of this file are not shown. View the raw message.

hw/pci/shpc.c +5 -3
index f3ea297a4d..5c2160c634 100644

Lines of this file are not shown. View the raw message.

hw/ppc/e500.c +2 -1
index 1b9abbb094..7a875c43f1 100644

Lines of this file are not shown. View the raw message.

hw/ppc/mac_newworld.c +1 -1
index bae1c0ac99..1d690d0c46 100644

Lines of this file are not shown. View the raw message.

hw/ppc/mac_oldworld.c +1 -1
index 97bb8541d7..86480f5176 100644

Lines of this file are not shown. View the raw message.

hw/ppc/pnv.c +5 -5
index 0e5236e577..d721131cca 100644

Lines of this file are not shown. View the raw message.

hw/ppc/pnv_core.c +4 -3
index 24d132cc3e..b61f63b7c0 100644

Lines of this file are not shown. View the raw message.

hw/ppc/pnv_lpc.c +1 -1
index f03a80a29b..700dabd9fc 100644

Lines of this file are not shown. View the raw message.

hw/ppc/pnv_occ.c +1 -1
index 04880f26d6..6e77014264 100644

Lines of this file are not shown. View the raw message.

hw/ppc/pnv_psi.c +1 -1
index 5dd697bdb4..370d662c0d 100644

Lines of this file are not shown. View the raw message.

hw/ppc/pnv_xscom.c +1 -1
index 38bc85f117..4f1b7c4de0 100644

Lines of this file are not shown. View the raw message.

hw/ppc/prep.c +1 -1
index bc7b2fd287..05d197dea1 100644

Lines of this file are not shown. View the raw message.

hw/ppc/prep_systemio.c +1 -1
index 50893ec529..eccdeb0ed7 100644

Lines of this file are not shown. View the raw message.

hw/ppc/rs6000_mc.c +1 -1
index b6135650bd..ef6bfd56c8 100644

Lines of this file are not shown. View the raw message.

hw/ppc/spapr.c +35 -26

61 lines not on this page · raw message

hw/ppc/spapr_cpu_core.c +5 -4
index 029a14120e..4b8ef5c2ab 100644

Lines of this file are not shown. View the raw message.

hw/ppc/spapr_drc.c +8 -7
index 867fe9cd84..8968f11654 100644

Lines of this file are not shown. View the raw message.

hw/ppc/spapr_hcall.c +1 -1
index aa1ffea9e5..b52375a2b9 100644

Lines of this file are not shown. View the raw message.

hw/ppc/spapr_iommu.c +1 -1
index bee492de12..e792c3fbe0 100644

Lines of this file are not shown. View the raw message.

hw/ppc/spapr_pci.c +7 -5
index 03eff2f67c..32bf290921 100644

Lines of this file are not shown. View the raw message.

hw/ppc/spapr_rng.c +1 -1
index 1d0968358e..f3feaf27fb 100644

Lines of this file are not shown. View the raw message.

hw/ppc/spapr_rtc.c +3 -2
index 5f4489ac1b..5990c69de3 100644

Lines of this file are not shown. View the raw message.

hw/ppc/spapr_vio.c +1 -1
index a0ee4fd265..a7ed564c77 100644

Lines of this file are not shown. View the raw message.

hw/s390x/3270-ccw.c +1 -1
index 6e6eee4e90..eeb889d62f 100644

Lines of this file are not shown. View the raw message.

hw/s390x/ccw-device.c +1 -1
index fb8d640a7e..6826d99565 100644

Lines of this file are not shown. View the raw message.

hw/s390x/css-bridge.c +1 -1
index 49e20a5786..6ae8b20227 100644

Lines of this file are not shown. View the raw message.

hw/s390x/css.c +5 -5
index cf3a3fa70a..9c020e7357 100644

Lines of this file are not shown. View the raw message.

hw/s390x/event-facility.c +3 -3
index 6eac626212..448418a82e 100644

Lines of this file are not shown. View the raw message.

hw/s390x/ipl.c +2 -2
index 1a9fd04692..f953941071 100644

Lines of this file are not shown. View the raw message.

hw/s390x/s390-ccw.c +4 -3
index 8614dda6f8..1aee8220dc 100644

Lines of this file are not shown. View the raw message.

hw/s390x/s390-pci-bus.c +6 -6
index aa4d7f5aa4..644e51b11e 100644

Lines of this file are not shown. View the raw message.

hw/s390x/s390-skeys.c +5 -4
index 251882a9dc..ad10b25e6f 100644

Lines of this file are not shown. View the raw message.

hw/s390x/s390-virtio-ccw.c +14 -11
index ae81723914..f82bf20533 100644

Lines of this file are not shown. View the raw message.

hw/s390x/s390-virtio.c +1 -1
index 79a1fa3b49..d861321d42 100644

Lines of this file are not shown. View the raw message.

hw/s390x/sclp.c +1 -1
index 1bd6b568f4..a4d2952a85 100644

Lines of this file are not shown. View the raw message.

hw/s390x/virtio-ccw.c +26 -15

41 lines not on this page · raw message

hw/scsi/esp-pci.c +2 -2
index 30f866d5a0..39cffa083b 100644

Lines of this file are not shown. View the raw message.

hw/scsi/esp.c +1 -1
index eee831efeb..1929a18abd 100644

Lines of this file are not shown. View the raw message.

hw/scsi/lsi53c895a.c +2 -2
index 3e56ab267c..0612f4e80b 100644

Lines of this file are not shown. View the raw message.

hw/scsi/megasas.c +1 -1
index e5a3e20a69..ca45d98898 100644

Lines of this file are not shown. View the raw message.

hw/scsi/mptsas.c +1 -1
index 765ab53c34..c7bead1f6e 100644

Lines of this file are not shown. View the raw message.

hw/scsi/scsi-bus.c +5 -4
index bb9f5628db..43deaf6c12 100644

Lines of this file are not shown. View the raw message.

hw/scsi/scsi-disk.c +7 -6
index d5c984504b..512f93bad0 100644

Lines of this file are not shown. View the raw message.

hw/scsi/scsi-generic.c +1 -1
index a55ff87c22..1957f5810c 100644

Lines of this file are not shown. View the raw message.

hw/scsi/spapr_vscsi.c +1 -1
index 55ee48c4da..a94edb0efc 100644

Lines of this file are not shown. View the raw message.

hw/scsi/vhost-scsi-common.c +1 -1
index e41c0314db..ddadc775c2 100644

Lines of this file are not shown. View the raw message.

hw/scsi/vhost-scsi.c +2 -2
index dea479b7ba..32098da6d4 100644

Lines of this file are not shown. View the raw message.

hw/scsi/virtio-scsi-dataplane.c +1 -1
index 944ea4eb53..7519dae4e9 100644

Lines of this file are not shown. View the raw message.

hw/scsi/virtio-scsi.c +9 -7
index a253b5df59..098c660d6d 100644

Lines of this file are not shown. View the raw message.

hw/scsi/vmw_pvscsi.c +5 -3
index e5133595dc..edb2ea975c 100644

Lines of this file are not shown. View the raw message.

hw/sd/pl181.c +1 -1
index 55c8098ecd..d310360bed 100644

Lines of this file are not shown. View the raw message.

hw/sd/sd.c +2 -2
index ba47bff4db..f9c696d177 100644

Lines of this file are not shown. View the raw message.

hw/sd/sdhci.c +2 -2
index 6d6a791ee9..b75fe59795 100644

Lines of this file are not shown. View the raw message.

hw/sd/ssi-sd.c +1 -1
index 24001dc3e6..3aa128c860 100644

Lines of this file are not shown. View the raw message.

hw/sh4/sh_pci.c +1 -1
index 38395c082b..5b01fcabbf 100644

Lines of this file are not shown. View the raw message.

hw/smbios/smbios-stub.c +1 -1
index 308739410f..1a88bd5aa0 100644

Lines of this file are not shown. View the raw message.

hw/smbios/smbios.c +1 -1
index 1a5437a07d..8cee645525 100644

Lines of this file are not shown. View the raw message.

hw/sparc/sun4m.c +2 -2
index 0faff4619f..cf433fae03 100644

Lines of this file are not shown. View the raw message.

hw/sparc64/sun4u.c +3 -3
index 69f565db25..171fed7dad 100644

Lines of this file are not shown. View the raw message.

hw/ssi/aspeed_smc.c +1 -1
index cb515730c5..03c7e45d11 100644

Lines of this file are not shown. View the raw message.

hw/ssi/imx_spi.c +1 -1
index b66505ca49..2f52d36d19 100644

Lines of this file are not shown. View the raw message.

hw/ssi/ssi.c +1 -1
index 7eaaf565fd..58880fe4cf 100644

Lines of this file are not shown. View the raw message.

hw/ssi/xilinx_spips.c +2 -2
index da8adfa443..3a0d23ab09 100644

Lines of this file are not shown. View the raw message.

hw/timer/a9gtimer.c +1 -1
index ce1dc63911..e2060deec5 100644

Lines of this file are not shown. View the raw message.

hw/timer/altera_timer.c +1 -1
index c9a0fc5dca..2c6ba35eca 100644

Lines of this file are not shown. View the raw message.

hw/timer/arm_mptimer.c +1 -1
index daf6c48797..ff1a38d992 100644

Lines of this file are not shown. View the raw message.

hw/timer/arm_timer.c +1 -1
index 98fddd7ac1..58420067ab 100644

Lines of this file are not shown. View the raw message.

hw/timer/aspeed_timer.c +1 -1
index 9b70ee09b0..e3006dfbf3 100644

Lines of this file are not shown. View the raw message.

hw/timer/hpet.c +1 -1
index a2c18b30c3..f8dc4ea3cf 100644

Lines of this file are not shown. View the raw message.

hw/timer/i8254.c +1 -1
index 5e61ad50a8..10b8163d08 100644

Lines of this file are not shown. View the raw message.

hw/timer/i8254_common.c +1 -1
index 976d5200f1..8bea8c2809 100644

Lines of this file are not shown. View the raw message.

hw/timer/imx_epit.c +1 -1
index 8677b753b1..d1a6dc7725 100644

Lines of this file are not shown. View the raw message.

hw/timer/imx_gpt.c +1 -1
index 4b9b54bf2e..fa193fbc0a 100644

Lines of this file are not shown. View the raw message.

hw/timer/lm32_timer.c +1 -1
index 2a07b59524..d09a91161a 100644

Lines of this file are not shown. View the raw message.

hw/timer/m48t59-isa.c +1 -1
index ea1ba703d7..1c8e737514 100644

Lines of this file are not shown. View the raw message.

hw/timer/m48t59.c +2 -2
index 844aad540e..a0bed45551 100644

Lines of this file are not shown. View the raw message.

hw/timer/mc146818rtc.c +4 -3
index b7b9e0f754..023f6e2877 100644

Lines of this file are not shown. View the raw message.

hw/timer/milkymist-sysctl.c +1 -1
index 93bc6e1790..09ee22592d 100644

Lines of this file are not shown. View the raw message.

hw/timer/pxa2xx_timer.c +1 -1
index 68ba5a70b3..fbbce15198 100644

Lines of this file are not shown. View the raw message.

hw/timer/xilinx_timer.c +1 -1
index 59439c05be..696012db96 100644

Lines of this file are not shown. View the raw message.

hw/tpm/tpm_tis.c +1 -1
index a6440fef91..e5d08b942c 100644

Lines of this file are not shown. View the raw message.

hw/usb/bus.c +12 -12
index 9c747821d2..75806177dd 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-audio.c +2 -2
index 343345235c..5b104a2781 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-bluetooth.c +2 -2
index 443e3c301d..2591415b7d 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-hid.c +5 -5
index 5b31791392..289b8a7f53 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-hub.c +2 -2
index e82a6a6c44..820d8a383a 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-mtp.c +1 -1
index 94c2e94f10..f0dfa6fb8c 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-network.c +2 -2
index 4c2536ed8c..a1b5a04d97 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-serial.c +1 -1
index cc9dd8b533..890817ddba 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-smartcard-reader.c +2 -2
index 49cb1829b5..1ec84c3019 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-storage.c +6 -6
index b3173553c5..1d28cf05ef 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-uas.c +2 -2
index fffc424396..eb777c5953 100644

Lines of this file are not shown. View the raw message.

hw/usb/dev-wacom.c +2 -2
index bf70013059..efd3b155df 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-ehci-pci.c +1 -1
index 6a19b23ebe..bcb6cf4350 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-ehci-sysbus.c +1 -1
index 6c20604d07..7267915f1f 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-ehci.c +3 -3
index 17c572c55f..689b536651 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-ohci.c +3 -3
index 2c221d23be..d93087106c 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-uhci.c +2 -2
index b99a4d6429..82beb7ce6e 100644

Lines of this file are not shown. View the raw message.

hw/usb/hcd-xhci.c +1 -1
index 05364b6955..b52743eca8 100644

Lines of this file are not shown. View the raw message.

hw/usb/host-libusb.c +2 -2
index c32ee8864c..ed6adfc620 100644

Lines of this file are not shown. View the raw message.

hw/usb/redirect.c +2 -2
index d50239e588..285145e170 100644

Lines of this file are not shown. View the raw message.

hw/vfio/amd-xgbe.c +1 -1
index fab196cebf..7fdfde4f5f 100644

Lines of this file are not shown. View the raw message.

hw/vfio/calxeda-xgmac.c +1 -1
index 7bb17af7ad..4f13b7ea26 100644

Lines of this file are not shown. View the raw message.

hw/vfio/ccw.c +7 -5
index d8dfbe321a..bd3929d354 100644

Lines of this file are not shown. View the raw message.

hw/vfio/common.c +4 -3
index b9abe77f5a..5b80852786 100644

Lines of this file are not shown. View the raw message.

hw/vfio/pci-quirks.c +4 -2
index 349085ea12..ed17a8f83c 100644

Lines of this file are not shown. View the raw message.

hw/vfio/pci.c +12 -10
index ae34f35a55..6a38239643 100644

Lines of this file are not shown. View the raw message.

hw/vfio/platform.c +5 -4
index a4663c918e..572111d558 100644

Lines of this file are not shown. View the raw message.

hw/virtio/vhost-vsock.c +5 -3
index 49e0022533..71af3b7b28 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-balloon.c +8 -6
index 09ac3b7d12..5015b4b083 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-bus.c +1 -1
index 3042232daf..27e15e2734 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-crypto-pci.c +2 -1
index fe66425540..46c7670afa 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-crypto.c +6 -4
index a4714af54a..6fb6b0e674 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-mmio.c +1 -1
index 5807aa87fe..9595ff5ae6 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-pci.c +24 -14
index d6a8b6be5f..2c707cccc4 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio-rng.c +5 -3
index 964c775e41..1de59642e9 100644

Lines of this file are not shown. View the raw message.

hw/virtio/virtio.c +2 -2
index 530b5e568e..b007358a19 100644

Lines of this file are not shown. View the raw message.

hw/watchdog/wdt_aspeed.c +1 -1
index 8bbe579b6b..caf9dd9bfa 100644

Lines of this file are not shown. View the raw message.

hw/watchdog/wdt_diag288.c +2 -2
index a7b64e2c40..1e0cec8b33 100644

Lines of this file are not shown. View the raw message.

hw/watchdog/wdt_i6300esb.c +1 -1
index 49b3cd188a..3d966d6db0 100644

Lines of this file are not shown. View the raw message.

hw/watchdog/wdt_ib700.c +1 -1
index 532afe89e7..90427e4a3f 100644

Lines of this file are not shown. View the raw message.

hw/xen/xen-host-pci-device.c +7 -5
index eed8cc88e3..00a07fbf17 100644

Lines of this file are not shown. View the raw message.

hw/xen/xen_pt.c +1 -1
index b6d71bb52a..33aaf0bfa7 100644

Lines of this file are not shown. View the raw message.

hw/xen/xen_pt_config_init.c +2 -2
index 6f18366f67..3d944cc1be 100644

Lines of this file are not shown. View the raw message.

hw/xen/xen_pt_graphics.c +1 -1
index 0f4c8d77e2..ba878974e3 100644

Lines of this file are not shown. View the raw message.

io/channel-buffer.c +5 -5
index 43d795976d..fe9710cf99 100644

Lines of this file are not shown. View the raw message.

io/channel-command.c +7 -7
index 2eea0135b0..fd4c89e5ee 100644

Lines of this file are not shown. View the raw message.

io/channel-file.c +6 -6
index b383273201..e433ba25d7 100644

Lines of this file are not shown. View the raw message.

io/channel-socket.c +15 -15
index 53386b7ba3..9da8cd956d 100644

Lines of this file are not shown. View the raw message.

io/channel-tls.c +7 -7
index 6350f5b25f..52aeaacae4 100644

Lines of this file are not shown. View the raw message.

io/channel-util.c +1 -1
index 0fb4bd0837..cd9a5da1d8 100644

Lines of this file are not shown. View the raw message.

io/channel-websock.c +13 -13
index 5a3badbec2..29bd041e0e 100644

Lines of this file are not shown. View the raw message.

io/channel.c +10 -10
index cdf74540c1..78fc21768e 100644

Lines of this file are not shown. View the raw message.

io/dns-resolver.c +3 -3
index 57a8896cbb..e728a8894d 100644

Lines of this file are not shown. View the raw message.

io/task.c +1 -1
index 3ce556017c..8a3dcf1537 100644

Lines of this file are not shown. View the raw message.

iothread.c +4 -4
index beeb870534..cebd5a6780 100644

Lines of this file are not shown. View the raw message.

memory.c +11 -10
index 0ddc4cc28d..d6a2d056c7 100644

Lines of this file are not shown. View the raw message.

memory_mapping.c +1 -1
index a5d38552a6..a04f2611a4 100644

Lines of this file are not shown. View the raw message.

migration/colo-failover.c +2 -2
index cc229f5ab1..87114f8d7a 100644

Lines of this file are not shown. View the raw message.

migration/colo.c +9 -9
index 039b8afa03..581ba6af8f 100644

Lines of this file are not shown. View the raw message.

migration/exec.c +3 -2
index 9077024286..02f2529b54 100644

Lines of this file are not shown. View the raw message.

migration/fd.c +3 -2
index 0077a505a3..91dc29b4fb 100644

Lines of this file are not shown. View the raw message.

migration/migration.c +19 -18
index 16bdd0a8d6..9f6b65f29c 100644

Lines of this file are not shown. View the raw message.

migration/rdma.c +15 -12
index 5cb9572a5c..5e9ed12138 100644

Lines of this file are not shown. View the raw message.

migration/savevm.c +7 -7
index 745caaebef..fa3332ff5f 100644

Lines of this file are not shown. View the raw message.

migration/socket.c +9 -7
index 018e1d1191..a8a2e3efb1 100644

Lines of this file are not shown. View the raw message.

migration/tls.c +3 -3
index bae9acad6c..42b8235552 100644

Lines of this file are not shown. View the raw message.

monitor.c +22 -21

43 lines not on this page · raw message

nbd/client.c +14 -11
index 8541e109a7..1e5b81f9f8 100644

Lines of this file are not shown. View the raw message.

nbd/common.c +1 -1
index bd81637ab9..eaa94072f9 100644

Lines of this file are not shown. View the raw message.

nbd/server.c +1 -1
index b617ad5a4b..464e8caa8c 100644

Lines of this file are not shown. View the raw message.

net/colo-compare.c +11 -8
index 16e46c3a6c..11d4391404 100644

Lines of this file are not shown. View the raw message.

net/dump.c +8 -7
index b66d56e06c..02ec91d784 100644

Lines of this file are not shown. View the raw message.

net/filter-buffer.c +5 -4
index 0a9c12aa1a..485b263a92 100644

Lines of this file are not shown. View the raw message.

net/filter-mirror.c +8 -8
index c86d355c93..c73a50ab65 100644

Lines of this file are not shown. View the raw message.

net/filter-rewriter.c +1 -1
index afa06e8919..b0d64140e1 100644

Lines of this file are not shown. View the raw message.

net/filter.c +11 -7
index 43af9f3733..9687d1ee28 100644

Lines of this file are not shown. View the raw message.

net/hub.c +1 -1
index 32d8cf5cd4..a50d7f92bd 100644

Lines of this file are not shown. View the raw message.

net/l2tpv3.c +1 -1
index 6745b78990..e86ab39f7a 100644

Lines of this file are not shown. View the raw message.

net/net.c +11 -10
index 5c09301692..cf86e6a298 100644

Lines of this file are not shown. View the raw message.

net/netmap.c +3 -2
index 2d11a8f4be..a1a8b3fb7b 100644

Lines of this file are not shown. View the raw message.

net/slirp.c +1 -1
index 6a6d727999..5325cb1e30 100644

Lines of this file are not shown. View the raw message.

net/socket.c +1 -1
index dcae1ae2c0..7c041ff5bd 100644

Lines of this file are not shown. View the raw message.

net/tap-bsd.c +6 -4
index 6c9692263d..5b6fb50090 100644

Lines of this file are not shown. View the raw message.

net/tap-linux.c +3 -2
index a503fa9c6e..6032377666 100644

Lines of this file are not shown. View the raw message.

net/tap-solaris.c +4 -3
index a2a92356c1..a44d4ec6c7 100644

Lines of this file are not shown. View the raw message.

net/tap-stub.c +3 -2
index a9ab8f8293..b3bdfc731f 100644

Lines of this file are not shown. View the raw message.

net/tap-win32.c +1 -1
index 662f9b63e1..4872d0cdb5 100644

Lines of this file are not shown. View the raw message.

net/tap.c +8 -7
index 70e5dda82a..15a12beb02 100644

Lines of this file are not shown. View the raw message.

net/vde.c +1 -1
index e50e5d6394..a4aedd25d7 100644

Lines of this file are not shown. View the raw message.

net/vhost-user.c +4 -3
index a042ec6a34..5774fb4377 100644

Lines of this file are not shown. View the raw message.

numa.c +7 -6
index 7886d31e09..49ad92804a 100644

Lines of this file are not shown. View the raw message.

qapi/opts-visitor.c +15 -11
index 3e408e4bf0..16b8b04b09 100644

Lines of this file are not shown. View the raw message.

qapi/qapi-clone-visitor.c +11 -9
index de756bfb33..bfb3ea88e4 100644

Lines of this file are not shown. View the raw message.

qapi/qapi-dealloc-visitor.c +12 -10
index e39457bc79..29584f999e 100644

Lines of this file are not shown. View the raw message.

qapi/qapi-util.c +1 -1
index e28dbd0ac3..65e09c5571 100644

Lines of this file are not shown. View the raw message.

qapi/qmp-dispatch.c +3 -2
index 5ad36f8a09..4eadb5adb5 100644

Lines of this file are not shown. View the raw message.

qapi/qobject-input-visitor.c +27 -21

48 lines not on this page · raw message

qapi/qobject-output-visitor.c +11 -9
index 871127079d..1892698d84 100644

Lines of this file are not shown. View the raw message.

qapi/string-input-visitor.c +10 -9
index bb4a21ce0d..f75ca82225 100644

Lines of this file are not shown. View the raw message.

qapi/string-output-visitor.c +7 -7
index 53c2175d81..7122717abb 100644

Lines of this file are not shown. View the raw message.

qdev-monitor.c +12 -11
index 7a802c6b37..c4f355aa24 100644

Lines of this file are not shown. View the raw message.

qemu-img.c +2 -2
index d0ab3af44b..0e387f5d4b 100644

Lines of this file are not shown. View the raw message.

qemu-nbd.c +2 -1
index 6ff0b0c070..3361aac577 100644

Lines of this file are not shown. View the raw message.

qga/commands-posix.c +75 -63

138 lines not on this page · raw message

qga/commands-win32.c +45 -38

83 lines not on this page · raw message

qga/commands.c +8 -8
index 3333ed50b2..6a1e5c9176 100644

Lines of this file are not shown. View the raw message.

qga/main.c +1 -1
index 00b064d1e0..8fff47fc1a 100644

Lines of this file are not shown. View the raw message.

qga/vss-win32.c +1 -1
index a80933c98b..2300b71adf 100644

Lines of this file are not shown. View the raw message.

qmp.c +39 -37

76 lines not on this page · raw message

qobject/json-parser.c +2 -1
index 506514100c..24a63ef61c 100644

Lines of this file are not shown. View the raw message.

qobject/qdict.c +2 -2
index 88e2ecd658..5a9ea24ffc 100644

Lines of this file are not shown. View the raw message.

qobject/qjson.c +3 -2
index b2f3bfec53..fb9b5e8ebc 100644

Lines of this file are not shown. View the raw message.

qom/cpu.c +5 -5
index 50698767dd..b724df7416 100644

Lines of this file are not shown. View the raw message.

qom/object.c +71 -64

135 lines not on this page · raw message

qom/object_interfaces.c +7 -6
index e8f0fa9b8d..08e09951fc 100644

Lines of this file are not shown. View the raw message.

qom/qom-qobject.c +2 -2
index 4aec20d73c..cd7d143f18 100644

Lines of this file are not shown. View the raw message.

qtest.c +2 -1
index 9a5d1dc50d..7c79a4a5c0 100644

Lines of this file are not shown. View the raw message.

replication.c +4 -4
index d8f00e75b2..174b2c7008 100644

Lines of this file are not shown. View the raw message.

stubs/arch-query-cpu-def.c +1 -1
index cefe4beb82..051811a10a 100644

Lines of this file are not shown. View the raw message.

stubs/arch-query-cpu-model-baseline.c +1 -1
index 094ec13c2c..aca479b75b 100644

Lines of this file are not shown. View the raw message.

stubs/arch-query-cpu-model-comparison.c +1 -1
index d5486ae980..2e384ce2da 100644

Lines of this file are not shown. View the raw message.

stubs/arch-query-cpu-model-expansion.c +1 -1
index ae7cf554d1..39167206a8 100644

Lines of this file are not shown. View the raw message.

stubs/migr-blocker.c +1 -1
index 2b64ac9560..c1545510bb 100644

Lines of this file are not shown. View the raw message.

stubs/monitor.c +1 -1
index e018c8f594..2d6092441b 100644

Lines of this file are not shown. View the raw message.

stubs/uuid.c +1 -1
index a880de8d61..49cbda99a4 100644

Lines of this file are not shown. View the raw message.

stubs/vmgenid.c +1 -1
index c64eb7a16e..b42a5e5a47 100644

Lines of this file are not shown. View the raw message.

stubs/vmstate.c +1 -1
index 6399474e49..a5356ccc0e 100644

Lines of this file are not shown. View the raw message.

stubs/xen-hvm.c +2 -2
index 3ca6c51b21..9a8e3ae9ba 100644

Lines of this file are not shown. View the raw message.

target/alpha/cpu.c +1 -1
index b0a391f54b..c48e270428 100644

Lines of this file are not shown. View the raw message.

target/arm/cpu.c +1 -1
index 00b17ca6af..d990141c2c 100644

Lines of this file are not shown. View the raw message.

target/arm/cpu64.c +3 -2
index 7d6055bb63..86cbb2caa0 100644

Lines of this file are not shown. View the raw message.

target/arm/helper.c +1 -1
index 2594faa9b8..a24d666546 100644

Lines of this file are not shown. View the raw message.

target/arm/monitor.c +1 -1
index 299cb80ae7..eba32bc41f 100644

Lines of this file are not shown. View the raw message.

target/cris/cpu.c +1 -1
index 32815e3fa3..cf015e97cf 100644

Lines of this file are not shown. View the raw message.

target/hppa/cpu.c +1 -1
index 500414752e..d36fe2be8d 100644

Lines of this file are not shown. View the raw message.

target/i386/arch_memory_mapping.c +1 -1
index 647cff2829..014e7c816a 100644

Lines of this file are not shown. View the raw message.

target/i386/cpu.c +35 -31

66 lines not on this page · raw message

target/lm32/cpu.c +1 -1
index 8bd90c09dc..5dc57cbae0 100644

Lines of this file are not shown. View the raw message.

target/m68k/cpu.c +1 -1
index ae7fa0e1b0..311ae39417 100644

Lines of this file are not shown. View the raw message.

target/microblaze/cpu.c +1 -1
index 026b5b3e3f..8ba789d711 100644

Lines of this file are not shown. View the raw message.

target/mips/cpu.c +1 -1
index 07c82ebb9d..73edc58e93 100644

Lines of this file are not shown. View the raw message.

target/moxie/cpu.c +1 -1
index ad7435ecbd..9887f98e34 100644

Lines of this file are not shown. View the raw message.

target/nios2/cpu.c +1 -1
index 227c5352a7..f2dce11e80 100644

Lines of this file are not shown. View the raw message.

target/openrisc/cpu.c +1 -1
index 8cd0a46bf1..a5ec210b53 100644

Lines of this file are not shown. View the raw message.

target/ppc/compat.c +3 -2
index e8ec1e19e7..c93f80ef50 100644

Lines of this file are not shown. View the raw message.

target/ppc/translate_init.c +6 -6
index 0597df737e..cb0bcf2bd9 100644

Lines of this file are not shown. View the raw message.

target/s390x/cpu.c +3 -3
index 7d9e104151..313634b6d6 100644

Lines of this file are not shown. View the raw message.

target/s390x/cpu_models.c +17 -15
index 4fde8f41fd..4e60f9f340 100644

Lines of this file are not shown. View the raw message.

target/s390x/helper.c +3 -2
index 1408ce2b4a..1a5c83b812 100644

Lines of this file are not shown. View the raw message.

target/s390x/kvm.c +3 -2
index 0979c1fc27..4d023c24b4 100644

Lines of this file are not shown. View the raw message.

target/sh4/cpu.c +1 -1
index dc2cbce478..54cc3b0433 100644

Lines of this file are not shown. View the raw message.

target/sparc/cpu.c +3 -3
index 51a6f129a1..7f8e991033 100644

Lines of this file are not shown. View the raw message.

target/tilegx/cpu.c +1 -1
index f8448c4c9e..c65e13f7f5 100644

Lines of this file are not shown. View the raw message.

target/tricore/cpu.c +1 -1
index efeb6553d0..1f66439825 100644

Lines of this file are not shown. View the raw message.

target/unicore32/cpu.c +1 -1
index 3b14cfa37d..b52a9d513b 100644

Lines of this file are not shown. View the raw message.

target/xtensa/cpu.c +1 -1
index 69bf002489..8045e9b33c 100644

Lines of this file are not shown. View the raw message.

tests/check-qom-proplist.c +6 -6
index 6145fcbab6..33cb4cc693 100644

Lines of this file are not shown. View the raw message.

tests/test-crypto-block.c +3 -3
index 95c4bd5da3..e4e2d0b837 100644

Lines of this file are not shown. View the raw message.

tests/test-crypto-tlscredsx509.c +1 -1
index a14b4b1cad..71103db19c 100644

Lines of this file are not shown. View the raw message.

tests/test-crypto-tlssession.c +1 -1
index 1a4a066d76..6f9be98eb0 100644

Lines of this file are not shown. View the raw message.

tests/test-io-channel-tls.c +1 -1
index 6509ab1045..b298674d28 100644

Lines of this file are not shown. View the raw message.

tests/test-logging.c +2 -1
index a12585f70a..2f85342208 100644

Lines of this file are not shown. View the raw message.

tests/test-qapi-util.c +5 -5
index 0305b9201b..d377e23bc2 100644

Lines of this file are not shown. View the raw message.

tests/test-qdev-global-props.c +2 -2
index 91ea932869..802c5cfb6a 100644

Lines of this file are not shown. View the raw message.

tests/test-qemu-opts.c +1 -1
index 5a596a6e7b..a3119078c4 100644

Lines of this file are not shown. View the raw message.

tests/test-qmp-commands.c +9 -8
index acdded4d67..78caddfe4c 100644

Lines of this file are not shown. View the raw message.

tests/test-qmp-event.c +2 -1
index 4c0f09601d..e4fa2c5e3f 100644

Lines of this file are not shown. View the raw message.

tests/test-visitor-serialization.c +15 -10
index 4d47ceec7a..9399ea5dcf 100644

Lines of this file are not shown. View the raw message.

tpm.c +4 -4
index d89b1e6cd6..0f028c5a78 100644

Lines of this file are not shown. View the raw message.

trace/qmp.c +4 -4
index ac777d154f..528f02b785 100644

Lines of this file are not shown. View the raw message.

ui/console.c +7 -5
index d914cced53..e6a09e446f 100644

Lines of this file are not shown. View the raw message.

ui/gtk.c +1 -1
index 49921fa5a5..9242382591 100644

Lines of this file are not shown. View the raw message.

ui/input-legacy.c +1 -1
index 7159747404..720a184ccb 100644

Lines of this file are not shown. View the raw message.

ui/input-linux.c +7 -7
index 6783ac1e5d..cb881b8a30 100644

Lines of this file are not shown. View the raw message.

ui/input.c +3 -3
index 290ca9f54d..4ae91052c3 100644

Lines of this file are not shown. View the raw message.

ui/spice-core.c +2 -2
index 88d6d16faf..f22f71da1f 100644

Lines of this file are not shown. View the raw message.

ui/vnc-auth-sasl.c +1 -1
index 4b6f0e5d5a..4e70fe15d4 100644

Lines of this file are not shown. View the raw message.

ui/vnc.c +15 -15
index 7acd3fe225..b4dcea747a 100644

Lines of this file are not shown. View the raw message.

util/aio-posix.c +2 -1
index 2d51239ec6..2286ae64cf 100644

Lines of this file are not shown. View the raw message.

util/aio-win32.c +2 -1
index bca496a47a..d29162d459 100644

Lines of this file are not shown. View the raw message.

util/async.c +1 -1
index 355af73ee7..900655f4f9 100644

Lines of this file are not shown. View the raw message.

util/base64.c +1 -1
index 9d3c46cbcc..e998eb4f50 100644

Lines of this file are not shown. View the raw message.

util/error.c +1 -1
index 2e16ad371c..8d765204e1 100644

Lines of this file are not shown. View the raw message.

util/keyval.c +5 -4
index 7dbda62305..2c5d9d0aa5 100644

Lines of this file are not shown. View the raw message.

util/log.c +2 -2
index 96f30dd21a..7244acbc6b 100644

Lines of this file are not shown. View the raw message.

util/main-loop.c +1 -1
index 19cad6b8b6..750000776d 100644

Lines of this file are not shown. View the raw message.

util/qemu-config.c +8 -7
index 48e5691f8d..4008d184ff 100644

Lines of this file are not shown. View the raw message.

util/qemu-option.c +23 -19

42 lines not on this page · raw message

util/qemu-sockets.c +41 -35

76 lines not on this page · raw message

util/throttle.c +1 -1
index 3570ed25fc..8d5955ae61 100644

Lines of this file are not shown. View the raw message.

vl.c +26 -18

44 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.11.0.259.g40922b1

Part of the diff is not shown here. View the raw message.

A message that is not in the archive (sent off-list or not yet received): 20170615121407.GA2399@work-vm

#17 lore raw

Re: [Qemu-devel] [RFC 15/15] [test only] Use 'Error *err[static 1]' instead of 'Error **errp' to catch NULL errp arguments

Quoted 44 lines · Dr. David Alan Gilbert
Quoted 40 lines · * Eduardo Habkost ([email protected]) wrote:

This is being included in the RFC just to help validating the series, and ensure we don't use NULL errp anywhere.

I don't propose we actually change all code to use the 'Error *errp[static 1]' syntax because it confuses Cocinelle.

I am considering including a assert(errp) line in the ERR_IS_SET() macro, so we can catch NULL errp at runtime in case somebody forgets about it.

Generated by the following Coccinelle patch:

@@
typedef Error;
type T;
identifier FN !~ "os_mem_prealloc|qemu_fork";
identifier errp;
@@
T FN(...,
- Error **errp
+ Error *errp[STATIC_1]

       );

@@
typedef Error;
type T;
identifier FN !~ "os_mem_prealloc|qemu_fork";
identifier errp;
@@
T FN(...,
- Error **errp
+ Error *errp[STATIC_1]

       ) { ... }

Followed by the following sed command:

  $ sed -i -e 's/\[STATIC_1\]/[static 1]/g' $(g grep -w -l STATIC_1)

---

<snip>

Quoted 7 lines

Review

Quoted 4 lines

void visit_start_struct(Visitor *v, const char *name, void **obj,

(quoted diff) +1 -1
-                        size_t size, Error **errp);
+                        size_t size, Error *errp[static 1]);

Is it possible to typedef that to something that hides the magic syntax?
Then we could get that down to QError errp or something like that?

Unfortunately it is not possible to hide it in a typedef: the "static" keyword inside the square brackets is a feature of function parameter declarations only. Using it on a typedef results in:

a.c:3:16: error: static or type qualifiers in non-parameter array declarator
typedef Error *ErrorPtr[static 1];

We could use a preprocessor macro, but I suspect this would also confuse Coccinelle.

Signature · 1 line
Eduardo
#18 lore raw

Re: [Qemu-devel] [RFC 15/15] [test only] Use 'Error *err[static 1]' instead of 'Error **errp' to catch NULL errp arguments

Quoted 53 lines · * Eduardo Habkost ([email protected]) wrote:
Quoted 44 lines · Dr. David Alan Gilbert
Quoted 40 lines · * Eduardo Habkost ([email protected]) wrote:

This is being included in the RFC just to help validating the series, and ensure we don't use NULL errp anywhere.

I don't propose we actually change all code to use the 'Error *errp[static 1]' syntax because it confuses Cocinelle.

I am considering including a assert(errp) line in the ERR_IS_SET() macro, so we can catch NULL errp at runtime in case somebody forgets about it.

Generated by the following Coccinelle patch:

@@
typedef Error;
type T;
identifier FN !~ "os_mem_prealloc|qemu_fork";
identifier errp;
@@
T FN(...,
- Error **errp
+ Error *errp[STATIC_1]

       );

@@
typedef Error;
type T;
identifier FN !~ "os_mem_prealloc|qemu_fork";
identifier errp;
@@
T FN(...,
- Error **errp
+ Error *errp[STATIC_1]

       ) { ... }

Followed by the following sed command:

  $ sed -i -e 's/\[STATIC_1\]/[static 1]/g' $(g grep -w -l STATIC_1)

---

<snip>

Quoted 7 lines

Review

Quoted 4 lines

void visit_start_struct(Visitor *v, const char *name, void **obj,

(quoted diff) +1 -1
-                        size_t size, Error **errp);
+                        size_t size, Error *errp[static 1]);

Is it possible to typedef that to something that hides the magic syntax?
Then we could get that down to QError errp or something like that?

Quoted 7 lines

Unfortunately it is not possible to hide it in a typedef: the "static" keyword inside the square brackets is a feature of function parameter declarations only. Using it on a typedef results in:

a.c:3:16: error: static or type qualifiers in non-parameter array declarator
typedef Error *ErrorPtr[static 1];

That's a shame; it's rather odd looking; still I think it's worth it if it simplifies the error code.

Quoted 5 lines

We could use a preprocessor macro, but I suspect this would also confuse Coccinelle.

Signature · 1 line
Eduardo

Dave
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#19 lore raw

Re: [Qemu-devel] [RFC 15/15] [test only] Use 'Error *err[static 1]' instead of 'Error **errp' to catch NULL errp arguments

Quoted 16 lines · Dr. David Alan Gilbert
Quoted 15 lines · * Eduardo Habkost ([email protected]) wrote:
Quoted 8 lines · Dr. David Alan Gilbert

Review

Quoted 4 lines · * Eduardo Habkost ([email protected]) wrote:

void visit_start_struct(Visitor *v, const char *name, void **obj,

(quoted diff) +1 -1
-                        size_t size, Error **errp);
+                        size_t size, Error *errp[static 1]);

Is it possible to typedef that to something that hides the magic syntax?
Then we could get that down to QError errp or something like that?

Unfortunately it is not possible to hide it in a typedef: the "static" keyword inside the square brackets is a feature of function parameter declarations only. Using it on a typedef results in:

Quoted 5 lines
Quoted 2 lines

a.c:3:16: error: static or type qualifiers in non-parameter array declarator
typedef Error *ErrorPtr[static 1];

That's a shame; it's rather odd looking; still I think it's worth it if it simplifies the error code.

Is gcc's __attribute__((nonnull)) any better? It seems to apply to the whole function prototype rather than an individual argument though so probably not :-(

thanks
-- PMM

#20 lore raw

Re: [Qemu-devel] [RFC 15/15] [test only] Use 'Error *err[static 1]' instead of 'Error **errp' to catch NULL errp arguments

Quoted 20 lines · Peter Maydell
Quoted 19 lines · Dr. David Alan Gilbert
Quoted 17 lines · * Eduardo Habkost ([email protected]) wrote:
Quoted 8 lines · Dr. David Alan Gilbert

Review

Quoted 4 lines · * Eduardo Habkost ([email protected]) wrote:

void visit_start_struct(Visitor *v, const char *name, void **obj,

(quoted diff) +1 -1
-                        size_t size, Error **errp);
+                        size_t size, Error *errp[static 1]);

Is it possible to typedef that to something that hides the magic syntax?
Then we could get that down to QError errp or something like that?

Unfortunately it is not possible to hide it in a typedef: the "static" keyword inside the square brackets is a feature of function parameter declarations only. Using it on a typedef results in:

a.c:3:16: error: static or type qualifiers in non-parameter array declarator
typedef Error *ErrorPtr[static 1];

Quoted 6 lines
Quoted 2 lines

That's a shame; it's rather odd looking; still I think it's worth it if it simplifies the error code.

Is gcc's __attribute__((nonnull)) any better? It seems to apply to the whole function prototype rather than an individual argument though so probably not :-(

It's possible to specify which arguments are non-null with nonnull(<arg-index>, ...). It's harder to use, but probably more Coccinelle-friendly.

Signature · 1 line
Eduardo
#21 lore raw

Re: [Qemu-devel] [RFC 15/15] [test only] Use 'Error *err[static 1]' instead of 'Error **errp' to catch NULL errp arguments

Quoted 7 lines · Eduardo Habkost
Quoted 3 lines

Is gcc's __attribute__((nonnull)) any better? It seems to apply to the whole function prototype rather than an individual argument though so probably not :-(

It's possible to specify which arguments are non-null with nonnull(<arg-index>, ...). It's harder to use, but probably more Coccinelle-friendly.

Libvirt uses it, wrapped in a macro; for example:

int ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
virCPUDefCopyModel(virCPUDefPtr dst,
const virCPUDef *src,
bool resetPolicy)
{ ...

and at least Coverity is able to use that information (libvirt had problems in the past where older gcc _silently_ mis-optimized a program that used the attribute, and ended up having our macro defined only during Coverity and not during normal compilation; but I think that's finally been resolved now that newer gcc is saner in its behavior). I don't know how much smarts Coccinelle has for coming up with the right parameter number in an automated conversion patch, though.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#22 lore raw

Re: [Qemu-devel] [RFC 15/15] [test only] Use 'Error *err[static 1]' instead of 'Error **errp' to catch NULL errp arguments

Quoted 18 lines · Eric Blake
Quoted 7 lines · Eduardo Habkost
Quoted 3 lines

Is gcc's __attribute__((nonnull)) any better? It seems to apply to the whole function prototype rather than an individual argument though so probably not :-(

It's possible to specify which arguments are non-null with nonnull(<arg-index>, ...). It's harder to use, but probably more Coccinelle-friendly.

Libvirt uses it, wrapped in a macro; for example:

int ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
virCPUDefCopyModel(virCPUDefPtr dst,
const virCPUDef *src,
bool resetPolicy)
{ ...

Quoted 7 lines

and at least Coverity is able to use that information (libvirt had problems in the past where older gcc _silently_ mis-optimized a program that used the attribute, and ended up having our macro defined only during Coverity and not during normal compilation; but I think that's finally been resolved now that newer gcc is saner in its behavior). I don't know how much smarts Coccinelle has for coming up with the right parameter number in an automated conversion patch, though.

In the worst case, the script could have a dozen transformations, one transformation for each possible number of function arguments.

However, I hit this Coccinelle bug when trying to implement that:
https://github.com/coccinelle/coccinelle/issues/107

Signature · 1 line
Eduardo
#23 lore raw
In reply to Eduardo Habkost
Quoted 19 lines · Eduardo Habkost

The Proposal
------------

I'm proposing replacing NULL errp with a special macro:
IGNORE_ERRORS. The macro will trigger special behavior in the error API that will make it not save any error information in the error pointer, but still keep track of boolean error state in *errp.

This will allow us to simplify the documented method to propagate errors from:

    Error *err = NULL;
    foo(arg, &err);
    if (err) {
        handle the error...
        error_propagate(errp, err);
    }
Quoted 6 lines

to:

    foo(arg, errp);
    if (ERR_IS_SET(errp)) {
        handle the error...
    }

Seems kind of neat to me!

Quoted 6 lines

This way, we can make ERR_IS_SET work even if errp was IGNORE_ERRORS. The ERR_IS_* macros are reimplemented as:

  #define ERR_IS_SET(e) (*(e) && *(e) != &ignored_error_unset)
  #define ERR_IS_IGNORED(e) (!(e) || *(e) == &ignored_error_unset || *(e) == &ignored_error_set)

Where the initial NULL checks go away if you get your way with a final patch.

Quoted 9 lines

Ensuring errp is never NULL
---------------------------

The last patch on this series changes the (Error **errp) parameters in functions to (Error *errp[static 1]), just to help validate the existing code, as clang warns about NULL arguments on that case. I don't think we should apply that patch, though, because the "[static 1]" syntax confuses Coccinelle.

Have you filed a bug report to the Coccinelle folks? But yeah, it is rather arcane C99 syntax that you don't see much of in common code.

Quoted 2 lines

(Probably the easiest solution for that is to add assert(errp) lines to the ERR_IS_*() macros.)

Or even having the macros use a forced dereference through errp->xxx may at least be enough for Coverity to catch things.

Quoted 18 lines

Git branch
----------

This series depend on a few extra cleanups that I didn't submit to qemu-devel yet. A git branch including this series is available at:

git://github.com/ehabkost/qemu-hacks.git work/err-api-rework-ignore-ptr-v1

Eduardo Habkost (15):
tests: Test cases for error API
error: New IGNORE_ERRORS macro
Add qapi/error.h includes on files that will need it [coccinelle] Use IGNORE_ERRORS instead of NULL as errp argument
qapi: Use IGNORE_ERRORS instead of NULL on generated code
test-qapi-util: Use IGNORE_ERRORS instead of NULL Manual changes to use IGNORE_ERRORS instead of NULL
error: New ERR_IS_* macros for checking Error** values

Quoted 8 lines

[coccinelle] Use ERR_IS_* macros
test-qapi-util: Use ERR_IS_* macros
Manual changes to use ERR_IS_* macros
error: Make IGNORED_ERRORS not a NULL pointer
rdma: Simplify var declaration to avoid confusing Coccinelle [coccinelle] Eliminate unnecessary local_err/error_propagate() usage [test only] Use 'Error *err[static 1]' instead of 'Error **errp' to
catch NULL errp arguments

I have not reviewed the series yet, but the idea looks promising.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#24 lore raw
In reply to Eduardo Habkost
Quoted 5 lines · Eduardo Habkost

Rationale
---------

I'm often bothered by the fact that we can't write the following:

Quoted 7 lines
    foo(arg, errp);
    if (*errp) {
        handle the error...
        error_propagate(errp, err);
    }

because errp can be NULL.

If foo() additionally returned an indication of success, you could write

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Nicely concise.

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

Quoted 8 lines

I understand the reason we need to support errp==NULL, as it makes life simpler for callers that don't want any extra error information. However, this has the cost of making the functions that report errors more complex and error-prone.

(Evidence of that: the 34 ERR_IS_* cases handled by the "use ERR_IS_* macros" patches in the series. Where existing code will crash or behave differently if errp is NULL.)

Which of them could *not* use a suitable return value instead of *errp?

Quoted 4 lines

I considered suggesting forbidding NULL errp, and just changing all callers that use NULL to have an err variable and call error_free(), but this would mean changing 690 function callers that pass NULL errp as argument.

Would also add lots of pointless malloc churn. The ability to ignore errors is a feature.

Quoted 25 lines

Here I'm proposing a mechanism to have the best of both worlds:
allow callers to ignore errors easily while allowing functions to propagate errors without an intermediate local_err variable.

The Proposal
------------

I'm proposing replacing NULL errp with a special macro:
IGNORE_ERRORS. The macro will trigger special behavior in the error API that will make it not save any error information in the error pointer, but still keep track of boolean error state in *errp.

This will allow us to simplify the documented method to propagate errors from:

    Error *err = NULL;
    foo(arg, &err);
    if (err) {
        handle the error...
        error_propagate(errp, err);
    }

to:

Quoted 7 lines
    foo(arg, errp);
    if (ERR_IS_SET(errp)) {
        handle the error...
    }

This will allow us to stop using local_err variables and error_propagate() on hundreds of cases.

Getting rid of unnecessary local_err boilerplate is good. The question is how. A possible alternative to your proposal is to follow GLib and make functions return success/failure.

How do the two compare?

Quoted 8 lines

Implementation
--------------

This replaces NULL errp arguments on function calls with a IGNORE_ERRORS macro. Checks for (!errp) are replaced by ERR_IS_IGNORED(errp). Checks for (*errp) are replaced by ERR_IS_SET(errp). No extra changes are required on function callers.

That's a lot of churn. One time pain, of course.

Quoted 31 lines

Then IGNORE_ERRORS is implemend as:

(& { &ignored_error_unset })

When error_set() is called and IGNORE_ERRORS was used, we set error state using:

  *errp = &ignored_error_set;

This way, we can make ERR_IS_SET work even if errp was IGNORE_ERRORS. The ERR_IS_* macros are reimplemented as:

  #define ERR_IS_SET(e) (*(e) && *(e) != &ignored_error_unset)
  #define ERR_IS_IGNORED(e) (!(e) || *(e) == &ignored_error_unset || *(e) == &ignored_error_set)

Ensuring errp is never NULL
---------------------------

The last patch on this series changes the (Error **errp) parameters in functions to (Error *errp[static 1]), just to help validate the existing code, as clang warns about NULL arguments on that case. I don't think we should apply that patch, though, because the "[static 1]" syntax confuses Coccinelle.

I have a branch where I experimented with the idea of replacing (Error **errp) parameters with an opaque type (void*, or a struct type). I gave up when I noticed it would require touching all callers to replace &err with a wrapper macro to convert to the right type. Suggestions to make NULL errp easier to detect at build time are welcome.

Quoted 2 lines

(Probably the easiest solution for that is to add assert(errp) lines to the ERR_IS_*() macros.)

We'll obviously struggle with null arguments until all the developers adjusted to the new interface. Possibly with occasional mistakes forever. Compile-time checking would really, really help.

Quoted 7 lines

Desirable side-effects
----------------------

Some of additional benefits from parts of this series:

* Making code that ignore error information more visible and greppable (using IGNORE_ERRORS).

True.

Drawback: Passing an address takes more code than passing null. Not sure it matters.

Quoted 3 lines

I believe many of those cases
are actually bugs and should use &error_abort or &error_fatal instead.

I've seen such bugs.

Of course, making possible offenders more greppable doesn't necessarily mean existing ones will get fixed and new ones will be avoided.

Quoted 3 lines

* Making code that depends on errp more visible and greppable (using ERR_IS_* macros). Some of those cases are also likely to be bugs, and need to be investigated.

Grepping for (local_)?errp? works well enough, doesn't it?

Quoted 16 lines

TODO
----

* Simplify more cases of local_error/error_propagate() to use errp directly.
* Update API documentation and code examples.
* Add a mechanism to ensure errp is never NULL.

Git branch
----------

This series depend on a few extra cleanups that I didn't submit to qemu-devel yet. A git branch including this series is available at:

git://github.com/ehabkost/qemu-hacks.git work/err-api-rework-ignore-ptr-v1

#25 lore raw
Quoted 17 lines · Markus Armbruster
Quoted 5 lines · Eduardo Habkost

Rationale
---------

I'm often bothered by the fact that we can't write the following:

Quoted 7 lines
    foo(arg, errp);
    if (*errp) {
        handle the error...
        error_propagate(errp, err);
    }

because errp can be NULL.

If foo() additionally returned an indication of success, you could write

Quoted 8 lines

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Nicely concise.

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

Interesting, I didn't know about that.

Quoted 11 lines
Quoted 9 lines

I understand the reason we need to support errp==NULL, as it makes life simpler for callers that don't want any extra error information. However, this has the cost of making the functions that report errors more complex and error-prone.

(Evidence of that: the 34 ERR_IS_* cases handled by the "use ERR_IS_* macros" patches in the series. Where existing code will crash or behave differently if errp is NULL.)

Which of them could *not* use a suitable return value instead of *errp?

I don't know. But I'm not trying to improve those 34 ERR_IS_* cases. I am trying to improve the 700+ functions that need the local_err/error_propagate() boilerplate code today. This series already handles 346 of them automatically (see patch 14/15).

Quoted 8 lines
Quoted 5 lines

I considered suggesting forbidding NULL errp, and just changing all callers that use NULL to have an err variable and call error_free(), but this would mean changing 690 function callers that pass NULL errp as argument.

Would also add lots of pointless malloc churn. The ability to ignore errors is a feature.

Exactly. My proposal keeps that ability.

Quoted 31 lines
Quoted 31 lines

Here I'm proposing a mechanism to have the best of both worlds:
allow callers to ignore errors easily while allowing functions to propagate errors without an intermediate local_err variable.

The Proposal
------------

I'm proposing replacing NULL errp with a special macro:
IGNORE_ERRORS. The macro will trigger special behavior in the error API that will make it not save any error information in the error pointer, but still keep track of boolean error state in *errp.

This will allow us to simplify the documented method to propagate errors from:

    Error *err = NULL;
    foo(arg, &err);
    if (err) {
        handle the error...
        error_propagate(errp, err);
    }

to:

    foo(arg, errp);
    if (ERR_IS_SET(errp)) {
        handle the error...
    }
Quoted 8 lines
Quoted 2 lines

This will allow us to stop using local_err variables and error_propagate() on hundreds of cases.

Getting rid of unnecessary local_err boilerplate is good. The question is how. A possible alternative to your proposal is to follow GLib and make functions return success/failure.

How do the two compare?

This proposal proposal already gets rid of 346 error_propagate() calls automatically, and we probably can get rid of many others with additional Coccinelle scripts.

Making functions return success/failure, on the other hand, would require rewriting them manually. This proposal doesn't even prevent that from happening. I'd say it helps on that, because we can now find cases that still need to be converted by grepping for ERR_IS_SET.

Quoted 11 lines
Quoted 9 lines

Implementation
--------------

This replaces NULL errp arguments on function calls with a IGNORE_ERRORS macro. Checks for (!errp) are replaced by ERR_IS_IGNORED(errp). Checks for (*errp) are replaced by ERR_IS_SET(errp). No extra changes are required on function callers.

That's a lot of churn. One time pain, of course.

Yes, and it was automated using Coccinelle.

Quoted 32 lines
Quoted 32 lines

Then IGNORE_ERRORS is implemend as:

(& { &ignored_error_unset })

When error_set() is called and IGNORE_ERRORS was used, we set error state using:

  *errp = &ignored_error_set;

This way, we can make ERR_IS_SET work even if errp was IGNORE_ERRORS. The ERR_IS_* macros are reimplemented as:

  #define ERR_IS_SET(e) (*(e) && *(e) != &ignored_error_unset)
  #define ERR_IS_IGNORED(e) (!(e) || *(e) == &ignored_error_unset || *(e) == &ignored_error_set)

Ensuring errp is never NULL
---------------------------

The last patch on this series changes the (Error **errp) parameters in functions to (Error *errp[static 1]), just to help validate the existing code, as clang warns about NULL arguments on that case. I don't think we should apply that patch, though, because the "[static 1]" syntax confuses Coccinelle.

I have a branch where I experimented with the idea of replacing (Error **errp) parameters with an opaque type (void*, or a struct type). I gave up when I noticed it would require touching all callers to replace &err with a wrapper macro to convert to the right type. Suggestions to make NULL errp easier to detect at build time are welcome.

Quoted 6 lines
Quoted 2 lines

(Probably the easiest solution for that is to add assert(errp) lines to the ERR_IS_*() macros.)

We'll obviously struggle with null arguments until all the developers adjusted to the new interface. Possibly with occasional mistakes forever. Compile-time checking would really, really help.

True. I'm investigating the possibility of using __attribute__((nonull(...))) with Coccinelle's help.

Quoted 6 lines
Quoted 6 lines

Desirable side-effects
----------------------

Some of additional benefits from parts of this series:

Quoted 7 lines
Quoted 2 lines

* Making code that ignore error information more visible and greppable (using IGNORE_ERRORS).

True.

Drawback: Passing an address takes more code than passing null. Not sure it matters.

I don't know what you mean by "more code". It requires just replacing NULL with IGNORE_ERRORS. The magic is hidden behind the macro.

Quoted 7 lines
Quoted 4 lines

I believe many of those cases
are actually bugs and should use &error_abort or &error_fatal instead.

I've seen such bugs.

Quoted 8 lines

Of course, making possible offenders more greppable doesn't necessarily mean existing ones will get fixed and new ones will be avoided.

Quoted 3 lines

* Making code that depends on errp more visible and greppable (using ERR_IS_* macros). Some of those cases are also likely to be bugs, and need to be investigated.

Grepping for (local_)?errp? works well enough, doesn't it?

I don't see how. I'm talking about two cases:

1) Code like this:

  int func1(..., Error **errp)
  {
      do_something(errp);
      if (errp && *errp) {
          /* handle error */
          return;
      }
      /* do something else */
  }

func1() is buggy because it behaves differently if errp is NULL.

2) Code like this:

  int func2(..., Error **errp)
  {
      do_something(errp);
      if (*errp) {
          /* handle error */
      }
  }

func2() is buggy because if crashes if errp is NULL.

I don't see an easy way to grep for them with the current code. With this series, (1) can be detected by grepping for ERR_IS_IGNORED, and (2) is fixed because ERR_IS_SET(errp) will work even if errp is NULL.

Quoted 17 lines
Quoted 17 lines

TODO
----

* Simplify more cases of local_error/error_propagate() to use errp directly.
* Update API documentation and code examples.
* Add a mechanism to ensure errp is never NULL.

Git branch
----------

This series depend on a few extra cleanups that I didn't submit to qemu-devel yet. A git branch including this series is available at:

git://github.com/ehabkost/qemu-hacks.git work/err-api-rework-ignore-ptr-v1

Signature · 1 line
Eduardo
#26 lore raw
Quoted 22 lines · Eduardo Habkost
Quoted 21 lines · Markus Armbruster
Quoted 5 lines · Eduardo Habkost

Rationale
---------

I'm often bothered by the fact that we can't write the following:

Quoted 7 lines
    foo(arg, errp);
    if (*errp) {
        handle the error...
        error_propagate(errp, err);
    }

because errp can be NULL.

If foo() additionally returned an indication of success, you could write

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Quoted 6 lines
Quoted 4 lines

Nicely concise.

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

Interesting, I didn't know about that.

See section "Description", in particular subsection "Rules for use of GError" at
https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html

Quoted 9 lines
Quoted 9 lines
Quoted 8 lines

I understand the reason we need to support errp==NULL, as it makes life simpler for callers that don't want any extra error information. However, this has the cost of making the functions that report errors more complex and error-prone.

(Evidence of that: the 34 ERR_IS_* cases handled by the "use ERR_IS_* macros" patches in the series. Where existing code will crash or behave differently if errp is NULL.)

Quoted 6 lines
Quoted 1 line

Which of them could *not* use a suitable return value instead of *errp?

I don't know. But I'm not trying to improve those 34 ERR_IS_* cases. I am trying to improve the 700+ functions that need the local_err/error_propagate() boilerplate code today. This series already handles 346 of them automatically (see patch 14/15).

I agree the goal is reducing error_propagate() boilerplate. I latched onto the 34 ERR_IS_* cases only because you presented them as examples.

Quoted 49 lines
Quoted 7 lines
Quoted 4 lines

I considered suggesting forbidding NULL errp, and just changing all callers that use NULL to have an err variable and call error_free(), but this would mean changing 690 function callers that pass NULL errp as argument.

Would also add lots of pointless malloc churn. The ability to ignore errors is a feature.

Exactly. My proposal keeps that ability.

Quoted 38 lines
Quoted 26 lines

Here I'm proposing a mechanism to have the best of both worlds:
allow callers to ignore errors easily while allowing functions to propagate errors without an intermediate local_err variable.

The Proposal
------------

I'm proposing replacing NULL errp with a special macro:
IGNORE_ERRORS. The macro will trigger special behavior in the error API that will make it not save any error information in the error pointer, but still keep track of boolean error state in *errp.

This will allow us to simplify the documented method to propagate errors from:

    Error *err = NULL;
    foo(arg, &err);
    if (err) {
        handle the error...
        error_propagate(errp, err);
    }

to:

Quoted 7 lines
    foo(arg, errp);
    if (ERR_IS_SET(errp)) {
        handle the error...
    }

This will allow us to stop using local_err variables and error_propagate() on hundreds of cases.

Getting rid of unnecessary local_err boilerplate is good. The question is how. A possible alternative to your proposal is to follow GLib and make functions return success/failure.

Quoted 8 lines
Quoted 1 line

How do the two compare?

This proposal proposal already gets rid of 346 error_propagate() calls automatically, and we probably can get rid of many others with additional Coccinelle scripts.

Making functions return success/failure, on the other hand, would require rewriting them manually.

Yes, but how would the *result* compare? I feel we should at least explore this. I'll try to find some time to play with it.

Coccinelle might let us automate some, but determining success vs. failure will commonly require human smarts.

How many such functions we have? Hmm...

    @r@
    identifier fun, errp;
    typedef Error;
    position p;
    @@
     void fun(..., Error **errp)@p
     {
         ...
     }
    @script:python@
        p << r.p;
        fun << r.fun;
    @@
    print("%s:%s:%s: %s()" % (p[0].file, p[0].line, p[0].column, fun))

Finds 1525. Correcting the void mistake will be a huge pain, but procrastinating can only make it grow.

Quoted 3 lines

This proposal doesn't even prevent
that from happening. I'd say it helps on that, because we can now find cases that still need to be converted by grepping for ERR_IS_SET.

I honestly doubt finding the cases is a problem. We just grep for error_propagate().

Quoted 65 lines
Quoted 10 lines
Quoted 8 lines

Implementation
--------------

This replaces NULL errp arguments on function calls with a IGNORE_ERRORS macro. Checks for (!errp) are replaced by ERR_IS_IGNORED(errp). Checks for (*errp) are replaced by ERR_IS_SET(errp). No extra changes are required on function callers.

That's a lot of churn. One time pain, of course.

Yes, and it was automated using Coccinelle.

Quoted 32 lines
Quoted 32 lines

Then IGNORE_ERRORS is implemend as:

(& { &ignored_error_unset })

When error_set() is called and IGNORE_ERRORS was used, we set error state using:

  *errp = &ignored_error_set;

This way, we can make ERR_IS_SET work even if errp was IGNORE_ERRORS. The ERR_IS_* macros are reimplemented as:

  #define ERR_IS_SET(e) (*(e) && *(e) != &ignored_error_unset)
  #define ERR_IS_IGNORED(e) (!(e) || *(e) == &ignored_error_unset || *(e) == &ignored_error_set)

Ensuring errp is never NULL
---------------------------

The last patch on this series changes the (Error **errp) parameters in functions to (Error *errp[static 1]), just to help validate the existing code, as clang warns about NULL arguments on that case. I don't think we should apply that patch, though, because the "[static 1]" syntax confuses Coccinelle.

I have a branch where I experimented with the idea of replacing (Error **errp) parameters with an opaque type (void*, or a struct type). I gave up when I noticed it would require touching all callers to replace &err with a wrapper macro to convert to the right type. Suggestions to make NULL errp easier to detect at build time are welcome.

Quoted 6 lines
Quoted 2 lines

(Probably the easiest solution for that is to add assert(errp) lines to the ERR_IS_*() macros.)

We'll obviously struggle with null arguments until all the developers adjusted to the new interface. Possibly with occasional mistakes forever. Compile-time checking would really, really help.

True. I'm investigating the possibility of using __attribute__((nonull(...))) with Coccinelle's help.

Quoted 9 lines
Quoted 8 lines

Desirable side-effects
----------------------

Some of additional benefits from parts of this series:

* Making code that ignore error information more visible and greppable (using IGNORE_ERRORS).

Quoted 7 lines
Quoted 4 lines

True.

Drawback: Passing an address takes more code than passing null. Not sure it matters.

I don't know what you mean by "more code". It requires just replacing NULL with IGNORE_ERRORS. The magic is hidden behind the macro.

Creating the IGNORE_ERRORS value and passing it requires more machine instructions than passing NULL. When ignored_error_unset is in another DSO, it also requires a relocation.

Quoted 9 lines
Quoted 9 lines
Quoted 3 lines

I believe many of those cases
are actually bugs and should use &error_abort or &error_fatal instead.

I've seen such bugs.

Of course, making possible offenders more greppable doesn't necessarily mean existing ones will get fixed and new ones will be avoided.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

* Making code that depends on errp more visible and greppable (using ERR_IS_* macros). Some of those cases are also likely to be bugs, and need to be investigated.

Grepping for (local_)?errp? works well enough, doesn't it?

I don't see how.

Full list of possible Error ** variables not named errp:

    $ git-grep -E '\bError \*\*' | grep -vE '\bError \*\*(errp\b|\))'
    HACKING:the eyes than propagating an Error object through an Error ** parameter.
    HACKING:only the function really knows, use Error **, and set suitable errors.
    block/quorum.c:    /* XXX - would be nice if we could pass in the Error **
    block/snapshot.c:                             Error **err)
    blockjob.c:/* A wrapper around block_job_cancel() taking an Error ** parameter so it may be
    docs/devel/writing-qmp-commands.txt:3. It takes an "Error **" argument. This is required. Later we will see how to
    hw/core/qdev.c:static bool check_only_migratable(Object *obj, Error **err)
    hw/core/qdev.c:        Error **local_errp = NULL;
    hw/core/qdev.c:static bool device_get_hotplugged(Object *obj, Error **err)
    hw/i386/amd_iommu.c:static void amdvi_realize(DeviceState *dev, Error **err)
    hw/sd/sdhci.c:static void sdhci_sysbus_realize(DeviceState *dev, Error ** errp)
    hw/usb/dev-network.c:static void usb_net_realize(USBDevice *dev, Error **errrp)
    include/block/snapshot.h:                             Error **err);
    include/qapi/error.h:void error_propagate(Error **dst_errp, Error *local_err);
    include/qom/object.h:                                    const uint64_t *v, Error **Errp);
    include/qom/object.h:                                          const uint64_t *v, Error **Errp);
    qga/commands-posix.c:GuestUserList *qmp_guest_get_users(Error **err)
    qga/commands-win32.c:GuestUserList *qmp_guest_get_users(Error **err)
    qga/commands.c:GuestExecStatus *qmp_guest_exec_status(int64_t pid, Error **err)
    qga/commands.c:                       Error **err)
    qga/commands.c:GuestHostName *qmp_guest_get_host_name(Error **err)
    qmp.c:void qmp_system_powerdown(Error **erp)
    util/error.c:void error_propagate(Error **dst_errp, Error *local_err)

I'll post a patch to rename the offenders.

Quoted 14 lines

I'm talking about two cases:

1) Code like this:

  int func1(..., Error **errp)
  {
      do_something(errp);
      if (errp && *errp) {
          /* handle error */
          return;
      }
      /* do something else */
  }
Quoted 1 line

func1() is buggy because it behaves differently if errp is NULL.

Does your series fix any such bugs? We hunted them all down long ago... Perhaps a few new ones have crept in since. Hmm... I can see two:

    $ git-grep -F 'errp && *errp'
    exec.c:        if (errp && *errp) {
    hw/mem/pc-dimm.c:        if (errp && *errp) {
    util/error.c:    assert(errp && *errp);
Quoted 11 lines

2) Code like this:

  int func2(..., Error **errp)
  {
      do_something(errp);
      if (*errp) {
          /* handle error */
      }
  }

func2() is buggy because if crashes if errp is NULL.

Does your series fix any such bugs? grep coughs up quite a few candidates...

Quoted 2 lines

I don't see an easy way to grep for them with the current code. With this series, (1) can be detected by grepping for ERR_IS_IGNORED,

How would example (1) look like then?

Quoted 19 lines
                                                                 and (2)

is fixed because ERR_IS_SET(errp) will work even if errp is NULL.

Quoted 16 lines
Quoted 16 lines

TODO
----

* Simplify more cases of local_error/error_propagate() to use errp directly.
* Update API documentation and code examples.
* Add a mechanism to ensure errp is never NULL.

Git branch
----------

This series depend on a few extra cleanups that I didn't submit to qemu-devel yet. A git branch including this series is available at:

git://github.com/ehabkost/qemu-hacks.git work/err-api-rework-ignore-ptr-v1

#27 lore raw
Quoted 4 lines · Markus Armbruster
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Markus Armbruster

Eduardo Habkost <[email protected]> writes:

[...]

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines

I understand the reason we need to support errp==NULL, as it makes life simpler for callers that don't want any extra error information. However, this has the cost of making the functions that report errors more complex and error-prone.

(Evidence of that: the 34 ERR_IS_* cases handled by the "use ERR_IS_* macros" patches in the series. Where existing code will crash or behave differently if errp is NULL.)

Which of them could *not* use a suitable return value instead of *errp?

Quoted 7 lines
Quoted 4 lines

I don't know. But I'm not trying to improve those 34 ERR_IS_* cases. I am trying to improve the 700+ functions that need the local_err/error_propagate() boilerplate code today. This series already handles 346 of them automatically (see patch 14/15).

I agree the goal is reducing error_propagate() boilerplate. I latched onto the 34 ERR_IS_* cases only because you presented them as examples.

The 34 ERR_IS_* cases were evidence of how easy it is to introduce mistakes with the current API. Probably most of them are instances of
(1) and (2) below.

Quoted 1 line

[...]

Quoted 39 lines
Quoted 39 lines
Quoted 26 lines
Quoted 26 lines

The Proposal
------------

I'm proposing replacing NULL errp with a special macro:
IGNORE_ERRORS. The macro will trigger special behavior in the error API that will make it not save any error information in the error pointer, but still keep track of boolean error state in *errp.

This will allow us to simplify the documented method to propagate errors from:

    Error *err = NULL;
    foo(arg, &err);
    if (err) {
        handle the error...
        error_propagate(errp, err);
    }

to:

    foo(arg, errp);
    if (ERR_IS_SET(errp)) {
        handle the error...
    }
Quoted 8 lines
Quoted 2 lines

This will allow us to stop using local_err variables and error_propagate() on hundreds of cases.

Getting rid of unnecessary local_err boilerplate is good. The question is how. A possible alternative to your proposal is to follow GLib and make functions return success/failure.

How do the two compare?

This proposal proposal already gets rid of 346 error_propagate() calls automatically, and we probably can get rid of many others with additional Coccinelle scripts.

Quoted 5 lines
Quoted 2 lines

Making functions return success/failure, on the other hand, would require rewriting them manually.

Yes, but how would the *result* compare? I feel we should at least explore this. I'll try to find some time to play with it.

I think the results of using the return value to indicate errors are possibly better. But even on that case, I think ERR_IS_SET will be useful to avoid error_propagate() boilerplate until we convert all of them.

Quoted 24 lines

Coccinelle might let us automate some, but determining success vs. failure will commonly require human smarts.

How many such functions we have? Hmm...

    @r@
    identifier fun, errp;
    typedef Error;
    position p;
    @@
     void fun(..., Error **errp)@p
     {
         ...
     }
    @script:python@
        p << r.p;
        fun << r.fun;
    @@
    print("%s:%s:%s: %s()" % (p[0].file, p[0].line, p[0].column, fun))

Finds 1525. Correcting the void mistake will be a huge pain, but procrastinating can only make it grow.

Quoted 6 lines
Quoted 3 lines

This proposal doesn't even prevent
that from happening. I'd say it helps on that, because we can now find cases that still need to be converted by grepping for ERR_IS_SET.

I honestly doubt finding the cases is a problem. We just grep for error_propagate().

True. But I think finding low-hanging fruits will still be a problem. e.g.:

  void f1(Error *errp);

  void f2(Error *errp)
  {
      do_something();
      f1(errp);
  }

The Coccinelle script above will find f1() and f2() (grep won't find either, but will probably find f2() callers). We will probably want to convert f1() before f2(), as converting f2() before f1() would require adding error_propagete() boilerplate to f2().

Quoted 1 line

[...]

Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 7 lines

Desirable side-effects
----------------------

Some of additional benefits from parts of this series:

* Making code that ignore error information more visible and greppable (using IGNORE_ERRORS).

True.

Drawback: Passing an address takes more code than passing null. Not sure it matters.

Quoted 6 lines
Quoted 2 lines

I don't know what you mean by "more code". It requires just replacing NULL with IGNORE_ERRORS. The magic is hidden behind the macro.

Creating the IGNORE_ERRORS value and passing it requires more machine instructions than passing NULL. When ignored_error_unset is in another DSO, it also requires a relocation.

Yes, it requires a few more machine instructions. Is this a problem in practice?

Quoted 63 lines
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines

I believe many of those cases
are actually bugs and should use &error_abort or &error_fatal instead.

I've seen such bugs.

Of course, making possible offenders more greppable doesn't necessarily mean existing ones will get fixed and new ones will be avoided.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

* Making code that depends on errp more visible and greppable (using ERR_IS_* macros). Some of those cases are also likely to be bugs, and need to be investigated.

Grepping for (local_)?errp? works well enough, doesn't it?

I don't see how.

Full list of possible Error ** variables not named errp:

    $ git-grep -E '\bError \*\*' | grep -vE '\bError \*\*(errp\b|\))'
    HACKING:the eyes than propagating an Error object through an Error ** parameter.
    HACKING:only the function really knows, use Error **, and set suitable errors.
    block/quorum.c:    /* XXX - would be nice if we could pass in the Error **
    block/snapshot.c:                             Error **err)
    blockjob.c:/* A wrapper around block_job_cancel() taking an Error ** parameter so it may be
    docs/devel/writing-qmp-commands.txt:3. It takes an "Error **" argument. This is required. Later we will see how to
    hw/core/qdev.c:static bool check_only_migratable(Object *obj, Error **err)
    hw/core/qdev.c:        Error **local_errp = NULL;
    hw/core/qdev.c:static bool device_get_hotplugged(Object *obj, Error **err)
    hw/i386/amd_iommu.c:static void amdvi_realize(DeviceState *dev, Error **err)
    hw/sd/sdhci.c:static void sdhci_sysbus_realize(DeviceState *dev, Error ** errp)
    hw/usb/dev-network.c:static void usb_net_realize(USBDevice *dev, Error **errrp)
    include/block/snapshot.h:                             Error **err);
    include/qapi/error.h:void error_propagate(Error **dst_errp, Error *local_err);
    include/qom/object.h:                                    const uint64_t *v, Error **Errp);
    include/qom/object.h:                                          const uint64_t *v, Error **Errp);
    qga/commands-posix.c:GuestUserList *qmp_guest_get_users(Error **err)
    qga/commands-win32.c:GuestUserList *qmp_guest_get_users(Error **err)
    qga/commands.c:GuestExecStatus *qmp_guest_exec_status(int64_t pid, Error **err)
    qga/commands.c:                       Error **err)
    qga/commands.c:GuestHostName *qmp_guest_get_host_name(Error **err)
    qmp.c:void qmp_system_powerdown(Error **erp)
    util/error.c:void error_propagate(Error **dst_errp, Error *local_err)

I'll post a patch to rename the offenders.

Quoted 14 lines

I'm talking about two cases:

1) Code like this:

  int func1(..., Error **errp)
  {
      do_something(errp);
      if (errp && *errp) {
          /* handle error */
          return;
      }
      /* do something else */
  }
Quoted 1 line

func1() is buggy because it behaves differently if errp is NULL.

Quoted 7 lines

Does your series fix any such bugs? We hunted them all down long ago... Perhaps a few new ones have crept in since. Hmm... I can see two:

    $ git-grep -F 'errp && *errp'
    exec.c:        if (errp && *errp) {
    hw/mem/pc-dimm.c:        if (errp && *errp) {
    util/error.c:    assert(errp && *errp);

This RFC doesn't fix those bugs, but just makes them more obvious and easier to fix. I plan to fix them in the final version of the series.

Quoted 13 lines
Quoted 11 lines

2) Code like this:

  int func2(..., Error **errp)
  {
      do_something(errp);
      if (*errp) {
          /* handle error */
      }
  }
Quoted 1 line

func2() is buggy because if crashes if errp is NULL.

Quoted 7 lines

Does your series fix any such bugs? grep coughs up quite a few candidates...

Quoted 2 lines

I don't see an easy way to grep for them with the current code. With this series, (1) can be detected by grepping for ERR_IS_IGNORED,

How would example (1) look like then?

diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 92fb482..4e5e2c9 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -316,7 +316,7 @@ uint64_t pc_dimm_get_free_addr(uint64_t address_space_start,
uint64_t dimm_size = object_property_get_int(OBJECT(dimm),
PC_DIMM_SIZE_PROP, errp);
- if (errp && *errp) {

  +        if (!ERR_IS_IGNORED(errp) && ERR_IS_SET(errp)) {
               goto out;
           }

Without this series, the fix for (1) requires adding error_propagate() boilerplate. With this series, the fix is to just drop the !ERR_IS_IGNORED check and keep the ERR_IS_SET check

Quoted 20 lines
Quoted 20 lines
                                                                 and (2)

is fixed because ERR_IS_SET(errp) will work even if errp is NULL.

Quoted 16 lines
Quoted 16 lines

TODO
----

* Simplify more cases of local_error/error_propagate() to use errp directly.
* Update API documentation and code examples.
* Add a mechanism to ensure errp is never NULL.

Git branch
----------

This series depend on a few extra cleanups that I didn't submit to qemu-devel yet. A git branch including this series is available at:

git://github.com/ehabkost/qemu-hacks.git work/err-api-rework-ignore-ptr-v1

Signature · 1 line
Eduardo
#28 lore raw
Quoted 22 lines · Eduardo Habkost
Quoted 4 lines · Markus Armbruster
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Markus Armbruster

Eduardo Habkost <[email protected]> writes:

[...]

Quoted 16 lines
Quoted 15 lines
Quoted 10 lines
Quoted 8 lines

I understand the reason we need to support errp==NULL, as it makes life simpler for callers that don't want any extra error information. However, this has the cost of making the functions that report errors more complex and error-prone.

(Evidence of that: the 34 ERR_IS_* cases handled by the "use ERR_IS_* macros" patches in the series. Where existing code will crash or behave differently if errp is NULL.)

Which of them could *not* use a suitable return value instead of *errp?

I don't know. But I'm not trying to improve those 34 ERR_IS_* cases. I am trying to improve the 700+ functions that need the local_err/error_propagate() boilerplate code today. This series already handles 346 of them automatically (see patch 14/15).

Quoted 6 lines
Quoted 2 lines

I agree the goal is reducing error_propagate() boilerplate. I latched onto the 34 ERR_IS_* cases only because you presented them as examples.

The 34 ERR_IS_* cases were evidence of how easy it is to introduce mistakes with the current API. Probably most of them are instances of
(1) and (2) below.

The current interface can be abused, but how much abuse actually creeps in? I think we've been doing reasonably well there since we got rid of the bad examples and improved documentation.

Moreover, the revised interface could also be abused. Nothing stops you from dereferencing errp before or after, the only thing that changes are the examples people see in code. I'm afraid the people who reinvent bad examples from scratch despite the documentation telling them not to will also bypass any macros the documentation tells them to use.

*Especially* if we use macros only sometimes. ERR_IS_SET(&err) makes no sense, so we'd still test err directly there, wouldn't we?

Quoted 43 lines

[...]

Quoted 42 lines
Quoted 41 lines
Quoted 26 lines
Quoted 26 lines

The Proposal
------------

I'm proposing replacing NULL errp with a special macro:
IGNORE_ERRORS. The macro will trigger special behavior in the error API that will make it not save any error information in the error pointer, but still keep track of boolean error state in *errp.

This will allow us to simplify the documented method to propagate errors from:

    Error *err = NULL;
    foo(arg, &err);
    if (err) {
        handle the error...
        error_propagate(errp, err);
    }

to:

    foo(arg, errp);
    if (ERR_IS_SET(errp)) {
        handle the error...
    }
Quoted 8 lines
Quoted 2 lines

This will allow us to stop using local_err variables and error_propagate() on hundreds of cases.

Getting rid of unnecessary local_err boilerplate is good. The question is how. A possible alternative to your proposal is to follow GLib and make functions return success/failure.

How do the two compare?

This proposal proposal already gets rid of 346 error_propagate() calls automatically, and we probably can get rid of many others with additional Coccinelle scripts.

Making functions return success/failure, on the other hand, would require rewriting them manually.

Quoted 7 lines
Quoted 2 lines

Yes, but how would the *result* compare? I feel we should at least explore this. I'll try to find some time to play with it.

I think the results of using the return value to indicate errors are possibly better. But even on that case, I think ERR_IS_SET will be useful to avoid error_propagate() boilerplate until we convert all of them.

See my assessment below.

Quoted 64 lines
Quoted 23 lines

Coccinelle might let us automate some, but determining success vs. failure will commonly require human smarts.

How many such functions we have? Hmm...

    @r@
    identifier fun, errp;
    typedef Error;
    position p;
    @@
     void fun(..., Error **errp)@p
     {
         ...
     }
    @script:python@
        p << r.p;
        fun << r.fun;
    @@
    print("%s:%s:%s: %s()" % (p[0].file, p[0].line, p[0].column, fun))

Finds 1525. Correcting the void mistake will be a huge pain, but procrastinating can only make it grow.

Quoted 6 lines
Quoted 3 lines

This proposal doesn't even prevent
that from happening. I'd say it helps on that, because we can now find cases that still need to be converted by grepping for ERR_IS_SET.

I honestly doubt finding the cases is a problem. We just grep for error_propagate().

True. But I think finding low-hanging fruits will still be a problem. e.g.:

  void f1(Error *errp);

  void f2(Error *errp)
  {
      do_something();
      f1(errp);
  }

The Coccinelle script above will find f1() and f2() (grep won't find either, but will probably find f2() callers). We will probably want to convert f1() before f2(), as converting f2() before f1() would require adding error_propagete() boilerplate to f2().

Quoted 1 line

[...]

Quoted 16 lines
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines

Desirable side-effects
----------------------

Some of additional benefits from parts of this series:

Quoted 7 lines
Quoted 2 lines

* Making code that ignore error information more visible and greppable (using IGNORE_ERRORS).

True.

Drawback: Passing an address takes more code than passing null. Not sure it matters.

I don't know what you mean by "more code". It requires just replacing NULL with IGNORE_ERRORS. The magic is hidden behind the macro.

Quoted 6 lines
Quoted 3 lines

Creating the IGNORE_ERRORS value and passing it requires more machine instructions than passing NULL. When ignored_error_unset is in another DSO, it also requires a relocation.

Yes, it requires a few more machine instructions. Is this a problem in practice?

Quoting myself: "Not sure it matters."

Quoted 65 lines
Quoted 65 lines
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines

I believe many of those cases
are actually bugs and should use &error_abort or &error_fatal instead.

I've seen such bugs.

Of course, making possible offenders more greppable doesn't necessarily mean existing ones will get fixed and new ones will be avoided.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

* Making code that depends on errp more visible and greppable (using ERR_IS_* macros). Some of those cases are also likely to be bugs, and need to be investigated.

Grepping for (local_)?errp? works well enough, doesn't it?

I don't see how.

Full list of possible Error ** variables not named errp:

    $ git-grep -E '\bError \*\*' | grep -vE '\bError \*\*(errp\b|\))'
    HACKING:the eyes than propagating an Error object through an Error ** parameter.
    HACKING:only the function really knows, use Error **, and set suitable errors.
    block/quorum.c:    /* XXX - would be nice if we could pass in the Error **
    block/snapshot.c:                             Error **err)
    blockjob.c:/* A wrapper around block_job_cancel() taking an Error ** parameter so it may be
    docs/devel/writing-qmp-commands.txt:3. It takes an "Error **" argument. This is required. Later we will see how to
    hw/core/qdev.c:static bool check_only_migratable(Object *obj, Error **err)
    hw/core/qdev.c:        Error **local_errp = NULL;
    hw/core/qdev.c:static bool device_get_hotplugged(Object *obj, Error **err)
    hw/i386/amd_iommu.c:static void amdvi_realize(DeviceState *dev, Error **err)
    hw/sd/sdhci.c:static void sdhci_sysbus_realize(DeviceState *dev, Error ** errp)
    hw/usb/dev-network.c:static void usb_net_realize(USBDevice *dev, Error **errrp)
    include/block/snapshot.h:                             Error **err);
    include/qapi/error.h:void error_propagate(Error **dst_errp, Error *local_err);
    include/qom/object.h:                                    const uint64_t *v, Error **Errp);
    include/qom/object.h:                                          const uint64_t *v, Error **Errp);
    qga/commands-posix.c:GuestUserList *qmp_guest_get_users(Error **err)
    qga/commands-win32.c:GuestUserList *qmp_guest_get_users(Error **err)
    qga/commands.c:GuestExecStatus *qmp_guest_exec_status(int64_t pid, Error **err)
    qga/commands.c:                       Error **err)
    qga/commands.c:GuestHostName *qmp_guest_get_host_name(Error **err)
    qmp.c:void qmp_system_powerdown(Error **erp)
    util/error.c:void error_propagate(Error **dst_errp, Error *local_err)

I'll post a patch to rename the offenders.

Quoted 14 lines

I'm talking about two cases:

1) Code like this:

  int func1(..., Error **errp)
  {
      do_something(errp);
      if (errp && *errp) {
          /* handle error */
          return;
      }
      /* do something else */
  }
Quoted 1 line

func1() is buggy because it behaves differently if errp is NULL.

Does your series fix any such bugs? We hunted them all down long ago... Perhaps a few new ones have crept in since. Hmm... I can see two:

Quoted 7 lines
Quoted 4 lines
    $ git-grep -F 'errp && *errp'
    exec.c:        if (errp && *errp) {
    hw/mem/pc-dimm.c:        if (errp && *errp) {
    util/error.c:    assert(errp && *errp);

This RFC doesn't fix those bugs, but just makes them more obvious and easier to fix. I plan to fix them in the final version of the series.

Well, these two are plenty obvious already :)

Quoted 30 lines
Quoted 12 lines
Quoted 11 lines

2) Code like this:

  int func2(..., Error **errp)
  {
      do_something(errp);
      if (*errp) {
          /* handle error */
      }
  }

func2() is buggy because if crashes if errp is NULL.

Quoted 7 lines

Does your series fix any such bugs? grep coughs up quite a few candidates...

Quoted 2 lines

I don't see an easy way to grep for them with the current code. With this series, (1) can be detected by grepping for ERR_IS_IGNORED,

How would example (1) look like then?

diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 92fb482..4e5e2c9 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -316,7 +316,7 @@ uint64_t pc_dimm_get_free_addr(uint64_t address_space_start,
uint64_t dimm_size = object_property_get_int(OBJECT(dimm),
PC_DIMM_SIZE_PROP, errp);
- if (errp && *errp) {

Quoted 7 lines
  +        if (!ERR_IS_IGNORED(errp) && ERR_IS_SET(errp)) {
               goto out;
           }

Without this series, the fix for (1) requires adding error_propagate() boilerplate. With this series, the fix is to just drop the !ERR_IS_IGNORED check and keep the ERR_IS_SET check

I think creating the fix is roughly the same work as before. The resulting code is a bit more compact: we avoid error_propagate() boilerplate, but pay for that with an ERR_IS_SET() macro.

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

is fixed because ERR_IS_SET(errp) will work even if errp is NULL.

Quoted 8 lines
Quoted 8 lines

TODO
----

* Simplify more cases of local_error/error_propagate() to use errp directly.
* Update API documentation and code examples.
* Add a mechanism to ensure errp is never NULL.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Git branch
----------

This series depend on a few extra cleanups that I didn't submit to qemu-devel yet. A git branch including this series is available at:

git://github.com/ehabkost/qemu-hacks.git work/err-api-rework-ignore-ptr-v1

I doubt the macros make the bug fixing materially easier, and I doubt they can reduce future bugs of this kind. What they can do is letting us get rid of error_propagate() boilerplate with relative ease.

If we switch to returning success/failure (which also gets rid of the boilerplate), then the macros may still let us get rid of boilerplate more quickly, for some additional churn. Worthwhile? Depends on how long the return value change takes us.

I think the first order of business is to figure out whether we want to pursue returning success/failure.

#29 lore raw
Quoted 27 lines · Markus Armbruster
Quoted 25 lines · Eduardo Habkost
Quoted 4 lines · Markus Armbruster
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Markus Armbruster

Eduardo Habkost <[email protected]> writes:

[...]

Quoted 18 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines

I understand the reason we need to support errp==NULL, as it makes life simpler for callers that don't want any extra error information. However, this has the cost of making the functions that report errors more complex and error-prone.

(Evidence of that: the 34 ERR_IS_* cases handled by the "use ERR_IS_* macros" patches in the series. Where existing code will crash or behave differently if errp is NULL.)

Quoted 6 lines
Quoted 1 line

Which of them could *not* use a suitable return value instead of *errp?

I don't know. But I'm not trying to improve those 34 ERR_IS_* cases. I am trying to improve the 700+ functions that need the local_err/error_propagate() boilerplate code today. This series already handles 346 of them automatically (see patch 14/15).

I agree the goal is reducing error_propagate() boilerplate. I latched onto the 34 ERR_IS_* cases only because you presented them as examples.

Quoted 7 lines
Quoted 3 lines

The 34 ERR_IS_* cases were evidence of how easy it is to introduce mistakes with the current API. Probably most of them are instances of
(1) and (2) below.

The current interface can be abused, but how much abuse actually creeps in? I think we've been doing reasonably well there since we got rid of the bad examples and improved documentation.

See the 30+ cases touched by patch 09/15. Except for the ones in error.c, all of them look like bugs to me.

I didn't investigate when each of them were introduced, though.

Quoted 9 lines

Moreover, the revised interface could also be abused. Nothing stops you from dereferencing errp before or after, the only thing that changes are the examples people see in code. I'm afraid the people who reinvent bad examples from scratch despite the documentation telling them not to will also bypass any macros the documentation tells them to use.

*Especially* if we use macros only sometimes. ERR_IS_SET(&err) makes no sense, so we'd still test err directly there, wouldn't we?

Any interface can be abused. But I still believe a simpler and easier interface for propagating errors is less likely to be abused.

But in either case, tools to detect abuse would be welcome. We can write Coccinelle scripts to detect most abuse of the existing error API.

Quoted 1 line

[...]

Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

is fixed because ERR_IS_SET(errp) will work even if errp is NULL.

Quoted 8 lines
Quoted 8 lines

TODO
----

* Simplify more cases of local_error/error_propagate() to use errp directly.
* Update API documentation and code examples.
* Add a mechanism to ensure errp is never NULL.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Git branch
----------

This series depend on a few extra cleanups that I didn't submit to qemu-devel yet. A git branch including this series is available at:

git://github.com/ehabkost/qemu-hacks.git work/err-api-rework-ignore-ptr-v1

Quoted 8 lines

I doubt the macros make the bug fixing materially easier, and I doubt they can reduce future bugs of this kind. What they can do is letting us get rid of error_propagate() boilerplate with relative ease.

If we switch to returning success/failure (which also gets rid of the boilerplate), then the macros may still let us get rid of boilerplate more quickly, for some additional churn. Worthwhile? Depends on how long the return value change takes us.

My assumption is that it will take a very long time.

Quoted 3 lines

I think the first order of business is to figure out whether we want to pursue returning success/failure.

OK. I will reply about that in a separate message.

Signature · 1 line
Eduardo
#30 lore raw
Quoted 48 lines · Eduardo Habkost
Quoted 27 lines · Markus Armbruster
Quoted 25 lines · Eduardo Habkost
Quoted 4 lines · Markus Armbruster
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Markus Armbruster

Eduardo Habkost <[email protected]> writes:

[...]

Quoted 18 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines

I understand the reason we need to support errp==NULL, as it makes life simpler for callers that don't want any extra error information. However, this has the cost of making the functions that report errors more complex and error-prone.

(Evidence of that: the 34 ERR_IS_* cases handled by the "use ERR_IS_* macros" patches in the series. Where existing code will crash or behave differently if errp is NULL.)

Quoted 6 lines
Quoted 1 line

Which of them could *not* use a suitable return value instead of *errp?

I don't know. But I'm not trying to improve those 34 ERR_IS_* cases. I am trying to improve the 700+ functions that need the local_err/error_propagate() boilerplate code today. This series already handles 346 of them automatically (see patch 14/15).

I agree the goal is reducing error_propagate() boilerplate. I latched onto the 34 ERR_IS_* cases only because you presented them as examples.

Quoted 7 lines
Quoted 3 lines

The 34 ERR_IS_* cases were evidence of how easy it is to introduce mistakes with the current API. Probably most of them are instances of
(1) and (2) below.

The current interface can be abused, but how much abuse actually creeps in? I think we've been doing reasonably well there since we got rid of the bad examples and improved documentation.

See the 30+ cases touched by patch 09/15. Except for the ones in error.c, all of them look like bugs to me.

I didn't investigate when each of them were introduced, though.

Quoted 7 lines

Moreover, the revised interface could also be abused. Nothing stops you from dereferencing errp before or after, the only thing that changes are the examples people see in code. I'm afraid the people who reinvent bad examples from scratch despite the documentation telling them not to will also bypass any macros the documentation tells them to use.

Quoted 5 lines
Quoted 2 lines

*Especially* if we use macros only sometimes. ERR_IS_SET(&err) makes no sense, so we'd still test err directly there, wouldn't we?

Any interface can be abused. But I still believe a simpler and easier interface for propagating errors is less likely to be abused.

Can you substantiate this claim with examples? I'm looking for arguments like "if existing code looks like $this, people could plausibly write $mistake, which is wrong. If it looks like $that, they could still write $related_mistake, but it seems far less likely."

Quoted 2 lines

But in either case, tools to detect abuse would be welcome. We can write Coccinelle scripts to detect most abuse of the existing error API.

checkpatch.pl would be nice, too. It's too stupid for rigorous checks. However, the ones you fix in PATCH 09 all involve *errp. Many of the *errp your patch doesn't touch look fishy to me. Should checkpatch.pl warn when it sees *errp in new code?

Quoted 24 lines

[...]

Quoted 23 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

is fixed because ERR_IS_SET(errp) will work even if errp is NULL.

Quoted 8 lines
Quoted 8 lines

TODO
----

* Simplify more cases of local_error/error_propagate() to use errp directly.
* Update API documentation and code examples.
* Add a mechanism to ensure errp is never NULL.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Git branch
----------

This series depend on a few extra cleanups that I didn't submit to qemu-devel yet. A git branch including this series is available at:

git://github.com/ehabkost/qemu-hacks.git work/err-api-rework-ignore-ptr-v1

I doubt the macros make the bug fixing materially easier, and I doubt they can reduce future bugs of this kind. What they can do is letting us get rid of error_propagate() boilerplate with relative ease.

Quoted 6 lines
Quoted 4 lines

If we switch to returning success/failure (which also gets rid of the boilerplate), then the macros may still let us get rid of boilerplate more quickly, for some additional churn. Worthwhile? Depends on how long the return value change takes us.

My assumption is that it will take a very long time.

"Very long time" would be bad, because unconverted code breeds more unconverted code by serving as bad example.

Big "convert from old way to do things to new way" tasks should only be started with a reasonable idea on how to end them. We've started too many such tasks sanguinely, and have had the darndest time ending any of them.

I'm investigating ways to automate parts of the job.

Quoted 4 lines
Quoted 2 lines

I think the first order of business is to figure out whether we want to pursue returning success/failure.

OK. I will reply about that in a separate message.

#31 lore raw
In reply to Markus Armbruster

On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote:
[...]

Quoted 5 lines

I doubt the macros make the bug fixing materially easier, and I doubt they can reduce future bugs of this kind. What they can do is letting us get rid of error_propagate() boilerplate with relative ease.

Quoted 7 lines

If we switch to returning success/failure (which also gets rid of the boilerplate), then the macros may still let us get rid of boilerplate more quickly, for some additional churn. Worthwhile? Depends on how long the return value change takes us.

I think the first order of business is to figure out whether we want to pursue returning success/failure.

About this, I'm unsure. Returning error information in two separate locations (the return value and *errp) makes it easier to introduce bugs that are hard to detect. Especially when the tree is an inconsistent state where we mix -1/0, -errno/0, FALSE/TRUE, NULL/non-NULL and void functions.

Signature · 1 line
Eduardo
#32 lore raw
Quoted 12 lines · Eduardo Habkost

On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote:
[...]

Quoted 10 lines

I doubt the macros make the bug fixing materially easier, and I doubt they can reduce future bugs of this kind. What they can do is letting us get rid of error_propagate() boilerplate with relative ease.

If we switch to returning success/failure (which also gets rid of the boilerplate), then the macros may still let us get rid of boilerplate more quickly, for some additional churn. Worthwhile? Depends on how long the return value change takes us.

Quoted 6 lines
Quoted 2 lines

I think the first order of business is to figure out whether we want to pursue returning success/failure.

About this, I'm unsure. Returning error information in two separate locations (the return value and *errp) makes it easier to introduce bugs that are hard to detect.

I sympathize with this argument. It's exactly what that made us avoid returning a success/failure indication.

Except when we don't actually avoid it:

* Functions returning a pointer typically return non-null on success, null on failure. Has inconsistency between return value and Error setting been a problem in practice? Nope.

* Quite a few functions return 0 on success, -errno on failure, to let callers handle different errors differently. Has inconsistency been a problem in practice? Nope again.

Aside: the original Error plan was to have callers check ErrorClass, but that didn't work out.

* Functions with a side effect typically either do their side effect and succeed, or do nothing and fail. Inconsistency between side effect and claimed success is theoretically possible no matter how success is
claimed: it's possible if the function returns success/failure, it's possible if it sets an Error on failure and doesn't on success, and it's possible if it does both.

My point is: returning void instead of success/failure gets rid only of a part of a theoretical problem, which turns out not much of a problem in practice.

Quoted 3 lines

Especially when the tree is an inconsistent
state where we mix -1/0, -errno/0, FALSE/TRUE, NULL/non-NULL and void functions.

This is basically ret<0/ret>=0, !ret/ret, void.

Getting rid of void would improve matters, wouldn't it?

#33 lore raw
Quoted 44 lines · Markus Armbruster
Quoted 12 lines · Eduardo Habkost

On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote:
[...]

Quoted 10 lines

I doubt the macros make the bug fixing materially easier, and I doubt they can reduce future bugs of this kind. What they can do is letting us get rid of error_propagate() boilerplate with relative ease.

If we switch to returning success/failure (which also gets rid of the boilerplate), then the macros may still let us get rid of boilerplate more quickly, for some additional churn. Worthwhile? Depends on how long the return value change takes us.

Quoted 6 lines
Quoted 2 lines

I think the first order of business is to figure out whether we want to pursue returning success/failure.

About this, I'm unsure. Returning error information in two separate locations (the return value and *errp) makes it easier to introduce bugs that are hard to detect.

I sympathize with this argument. It's exactly what that made us avoid returning a success/failure indication.

Except when we don't actually avoid it:

* Functions returning a pointer typically return non-null on success, null on failure. Has inconsistency between return value and Error setting been a problem in practice? Nope.

* Quite a few functions return 0 on success, -errno on failure, to let callers handle different errors differently. Has inconsistency been a problem in practice? Nope again.

Aside: the original Error plan was to have callers check ErrorClass, but that didn't work out.

* Functions with a side effect typically either do their side effect and succeed, or do nothing and fail. Inconsistency between side effect and claimed success is theoretically possible no matter how success is
claimed: it's possible if the function returns success/failure, it's possible if it sets an Error on failure and doesn't on success, and it's possible if it does both.

Quoted 4 lines

My point is: returning void instead of success/failure gets rid only of a part of a theoretical problem, which turns out not much of a problem in practice.

You are probably right. And I guess we will find out quickly if this is not the case and the conversion to bool starts introducing more complex or buggy code.

Quoted 7 lines
Quoted 3 lines

Especially when the tree is an inconsistent
state where we mix -1/0, -errno/0, FALSE/TRUE, NULL/non-NULL and void functions.

This is basically ret<0/ret>=0, !ret/ret, void.

Getting rid of void would improve matters, wouldn't it?

Yes.

Signature · 1 line
Eduardo
#34 lore raw
In reply to Eduardo Habkost
Quoted 21 lines · Eduardo Habkost
Quoted 19 lines · Markus Armbruster
Quoted 18 lines

Ensuring errp is never NULL
---------------------------

The last patch on this series changes the (Error **errp) parameters in functions to (Error *errp[static 1]), just to help validate the existing code, as clang warns about NULL arguments on that case. I don't think we should apply that patch, though, because the "[static 1]" syntax confuses Coccinelle.

I have a branch where I experimented with the idea of replacing (Error **errp) parameters with an opaque type (void*, or a struct type). I gave up when I noticed it would require touching all callers to replace &err with a wrapper macro to convert to the right type. Suggestions to make NULL errp easier to detect at build time are welcome.

(Probably the easiest solution for that is to add assert(errp) lines to the ERR_IS_*() macros.)

Quoted 6 lines
Quoted 3 lines

We'll obviously struggle with null arguments until all the developers adjusted to the new interface. Possibly with occasional mistakes forever. Compile-time checking would really, really help.

True. I'm investigating the possibility of using __attribute__((nonull(...))) with Coccinelle's help.

Beware that '__attribute__((nonnull))' has two distinct effects, one of which is a potentially nasty trap which leads to crashes....

The useful part is that it allows compilers & analysis tools like coverity to warn if you accidentally pass NULL into a method. These warnings, particularly from gcc, only catch a fraction of scenarios where you pass NULL in though.

The less useful part is that if GCC sees a nonnull annotation on a parameter, then in the body of the method, it will silently remove any code which does "if (!paramname)". So if you added a check for the parameter being NULL to avoid a crash, gcc will remove that protection, so you'll once again get a crash at runtime if passing NULL.

So if you use the nonnull annotation, they you probably want to make sure to pass -fno-delete-null-pointer-checks to GCC to stop it removing your protection code, or you need to be very confident that nothing will mistakenly pass NULL into the methods annotated nonnull.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#35 lore raw
In reply to Markus Armbruster
Quoted 11 lines · Markus Armbruster

If foo() additionally returned an indication of success, you could write

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Nicely concise.

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

I find Eduardo's proposal better. With GLib's way it's easy to confuse functions that return 0/-1, 0/-errno, TRUE/FALSE, FALSE/TRUE or NULL/non-NULL.

Declaring and testing local_err doesn't introduce much boilerplate, it's propagation to errp that does. The disadvantage of Eduardo's mechanism is that it produces slightly worse code, but Error** is rarely used in hot code. It could also be improved slightly by changing ignored_error_unset and ignored_error_set to a 2-element array.

Paolo

#36 lore raw
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Markus Armbruster

If foo() additionally returned an indication of success, you could write

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Nicely concise.

Quoted 7 lines
Quoted 3 lines

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

I find Eduardo's proposal better. With GLib's way it's easy to confuse functions that return 0/-1, 0/-errno, TRUE/FALSE, FALSE/TRUE or NULL/non-NULL.

NB, glib basically standardizes on just FALSE/TRUE and NULL/non-NULL, avoiding anything returning -1, or errno values, so in their usage there isn't really any confusion.

QEMU of course has lots of pre-existing code, but we could at least declare a preferred approach, and work towards it.

Having the return value indicate error is slightly shorter, and it avoids all the blackmagic with special Error values in Eduardo's series. Most usefully, it lets you use __attribute__(return_check) to get compile time checking of callers who forget to check for failure.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#37 lore raw
Quoted 22 lines · Daniel P. Berrange
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Markus Armbruster

If foo() additionally returned an indication of success, you could write

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Nicely concise.

Quoted 7 lines
Quoted 3 lines

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

I find Eduardo's proposal better. With GLib's way it's easy to confuse functions that return 0/-1, 0/-errno, TRUE/FALSE, FALSE/TRUE or NULL/non-NULL.

NB, glib basically standardizes on just FALSE/TRUE and NULL/non-NULL, avoiding anything returning -1, or errno values, so in their usage there isn't really any confusion.

Quoted 8 lines

QEMU of course has lots of pre-existing code, but we could at least declare a preferred approach, and work towards it.

Having the return value indicate error is slightly shorter, and it avoids all the blackmagic with special Error values in Eduardo's series. Most usefully, it lets you use __attribute__(return_check) to get compile time checking of callers who forget to check for failure.

I agree it's better when the return value is obvious, but I still think the Error value magic in IGNORE_ERRORS/ERR_IS_SET is preferable to the existing 700+ error_propagate() calls in the tree.

Signature · 1 line
Eduardo
#38 lore raw
Quoted 32 lines · Eduardo Habkost
Quoted 22 lines · Daniel P. Berrange
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Markus Armbruster

If foo() additionally returned an indication of success, you could write

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Nicely concise.

Quoted 7 lines
Quoted 3 lines

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

I find Eduardo's proposal better. With GLib's way it's easy to confuse functions that return 0/-1, 0/-errno, TRUE/FALSE, FALSE/TRUE or NULL/non-NULL.

NB, glib basically standardizes on just FALSE/TRUE and NULL/non-NULL, avoiding anything returning -1, or errno values, so in their usage there isn't really any confusion.

Quoted 8 lines

QEMU of course has lots of pre-existing code, but we could at least declare a preferred approach, and work towards it.

Having the return value indicate error is slightly shorter, and it avoids all the blackmagic with special Error values in Eduardo's series. Most usefully, it lets you use __attribute__(return_check) to get compile time checking of callers who forget to check for failure.

Quoted 3 lines

I agree it's better when the return value is obvious, but I still think the Error value magic in IGNORE_ERRORS/ERR_IS_SET is preferable to the existing 700+ error_propagate() calls in the tree.

Both approaches would let us kill the error_propagate() calls. I think we're all agreed those would be better off gone, no matter which approach is used.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#39 lore raw
Quoted 33 lines · Daniel P. Berrange
Quoted 32 lines · Eduardo Habkost
Quoted 30 lines · Daniel P. Berrange
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Markus Armbruster

If foo() additionally returned an indication of success, you could write

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Nicely concise.

Quoted 7 lines
Quoted 3 lines

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

I find Eduardo's proposal better. With GLib's way it's easy to confuse functions that return 0/-1, 0/-errno, TRUE/FALSE, FALSE/TRUE or NULL/non-NULL.

NB, glib basically standardizes on just FALSE/TRUE and NULL/non-NULL, avoiding anything returning -1, or errno values, so in their usage there isn't really any confusion.

QEMU of course has lots of pre-existing code, but we could at least declare a preferred approach, and work towards it.

Having the return value indicate error is slightly shorter, and it avoids all the blackmagic with special Error values in Eduardo's series. Most usefully, it lets you use __attribute__(return_check) to get compile time checking of callers who forget to check for failure.

Quoted 7 lines
Quoted 3 lines

I agree it's better when the return value is obvious, but I still think the Error value magic in IGNORE_ERRORS/ERR_IS_SET is preferable to the existing 700+ error_propagate() calls in the tree.

Both approaches would let us kill the error_propagate() calls. I think we're all agreed those would be better off gone, no matter which approach is used.

Changing the return value of the 1500+ void functions that return errors will take a very long while. I would like to get rid of the error_propagate() calls before that, even if the long term plan is to eventually get rid of ERR_IS_SET.

Signature · 1 line
Eduardo
#40 lore raw
Quoted 38 lines · Eduardo Habkost
Quoted 37 lines · Daniel P. Berrange
Quoted 35 lines · Eduardo Habkost
Quoted 22 lines · Daniel P. Berrange
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Markus Armbruster

If foo() additionally returned an indication of success, you could write

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Nicely concise.

Quoted 7 lines
Quoted 3 lines

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

I find Eduardo's proposal better. With GLib's way it's easy to confuse functions that return 0/-1, 0/-errno, TRUE/FALSE, FALSE/TRUE or NULL/non-NULL.

NB, glib basically standardizes on just FALSE/TRUE and NULL/non-NULL, avoiding anything returning -1, or errno values, so in their usage there isn't really any confusion.

Quoted 8 lines

QEMU of course has lots of pre-existing code, but we could at least declare a preferred approach, and work towards it.

Having the return value indicate error is slightly shorter, and it avoids all the blackmagic with special Error values in Eduardo's series. Most usefully, it lets you use __attribute__(return_check) to get compile time checking of callers who forget to check for failure.

I agree it's better when the return value is obvious, but I still think the Error value magic in IGNORE_ERRORS/ERR_IS_SET is preferable to the existing 700+ error_propagate() calls in the tree.

Quoted 8 lines
Quoted 3 lines

Both approaches would let us kill the error_propagate() calls. I think we're all agreed those would be better off gone, no matter which approach is used.

Changing the return value of the 1500+ void functions that return errors will take a very long while. I would like to get rid of the error_propagate() calls before that, even if the long term plan is to eventually get rid of ERR_IS_SET.

Ah, I see what you mean, that's fine.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#41 lore raw
In reply to Markus Armbruster
Quoted 17 lines · Markus Armbruster
Quoted 5 lines · Eduardo Habkost

Rationale
---------

I'm often bothered by the fact that we can't write the following:

Quoted 7 lines
    foo(arg, errp);
    if (*errp) {
        handle the error...
        error_propagate(errp, err);
    }

because errp can be NULL.

If foo() additionally returned an indication of success, you could write

Quoted 8 lines

if (!foo(arg, errp)) { // assuming foo() returns a bool
handle the error...
}

Nicely concise.

For what it's worth, this is how GLib wants GError to be used. We deviated from it, and it has turned out to be a self-inflicted wound.

FWIW, I took that approach for the io & crypto layers - except returning 0 vs -1, rather than true/false, precisely because it lead to simpler code by not having to use local errors and propagation.

For added benefit you can potentially then also annotate the method as __attribute__(return_check) to force the caller to include a check for error conditions, which is often a useful compile time protection to have.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|