qemu/backends
Markus Armbruster 7eecec7d12 qom: Drop object_property_set_description() parameter @errp
object_property_set_description() and
object_class_property_set_description() fail only when property @name
is not found.

There are 85 calls of object_property_set_description() and
object_class_property_set_description().  None of them can fail:

* 84 immediately follow the creation of the property.

* The one in spapr_rng_instance_init() refers to a property created in
  spapr_rng_class_init(), from spapr_rng_properties[].

Every one of them still gets to decide what to pass for @errp.

51 calls pass &error_abort, 32 calls pass NULL, one receives the error
and propagates it to &error_abort, and one propagates it to
&error_fatal.  I'm actually surprised none of them violates the Error
API.

What are we gaining by letting callers handle the "property not found"
error?  Use when the property is not known to exist is simpler: you
don't have to guard the call with a check.  We haven't found such a
use in 5+ years.  Until we do, let's make life a bit simpler and drop
the @errp parameter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200505152926.18877-8-armbru@redhat.com>
[One semantic rebase conflict resolved]
2020-05-15 07:06:49 +02:00
..
cryptodev-builtin.c cryptodev: Fix cryptodev_builtin_cleanup() error API violation 2020-04-29 08:01:52 +02:00
cryptodev-vhost-user.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
cryptodev-vhost.c cryptodev: add vhost support 2018-03-01 18:26:17 +02:00
cryptodev.c backends/cryptodev: drop local_err from cryptodev_backend_complete() 2019-12-18 08:43:19 +01:00
dbus-vmstate.c migration: Define VMSTATE_INSTANCE_ID_ANY 2020-01-20 09:10:23 +01:00
hostmem-file.c hostmem: fix strict bind policy 2020-02-19 16:50:02 +00:00
hostmem-memfd.c qom: Drop object_property_set_description() parameter @errp 2020-05-15 07:06:49 +02:00
hostmem-ram.c machine: alias -mem-path and -mem-prealloc into memory-foo backend 2020-02-19 16:49:53 +00:00
hostmem.c qom: Drop object_property_set_description() parameter @errp 2020-05-15 07:06:49 +02:00
Makefile.objs Add dbus-vmstate object 2020-01-06 18:41:32 +04:00
rng-builtin.c virtio-rng: change default backend to rng-builtin 2019-09-04 06:32:51 -04:00
rng-egd.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
rng-random.c VirtIO-RNG: Update default entropy source to /dev/urandom 2019-07-03 17:23:39 +02:00
rng.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
tpm.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
trace-events Add dbus-vmstate object 2020-01-06 18:41:32 +04:00
vhost-user.c backends/vhost-user.c: prevent using uninitialized vqs 2019-09-16 06:27:35 -04:00