qemu-patch-raspberry4/hw/xen
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
..
Makefile.objs xen: add a mechanism to automatically create XenDevice-s... 2019-01-14 13:45:40 +00:00
trace-events xen: perform XenDevice clean-up in XenBus watch handler 2019-09-24 12:18:47 +01:00
xen-backend.c xen: add a mechanism to automatically create XenDevice-s... 2019-01-14 13:45:40 +00:00
xen-bus-helper.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
xen-bus.c xen-bus/block: explicitly assign event channels to an AioContext 2020-02-27 11:50:30 +00:00
xen-common.c qom: Drop object_property_set_description() parameter @errp 2020-05-15 07:06:49 +02:00
xen-host-pci-device.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
xen-host-pci-device.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
xen-legacy-backend.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
xen_devconfig.c Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
xen_pt.c xen/pt: Fix flawed conversion to realize() 2020-04-29 08:01:52 +02:00
xen_pt.h misc: Replace zero-length arrays with flexible array member (automatic) 2020-03-16 22:07:42 +01:00
xen_pt_config_init.c xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
xen_pt_graphics.c Avoid cpu_physical_memory_rw() with a constant is_write argument 2020-02-20 14:47:08 +01:00
xen_pt_load_rom.c hw/xen/xen_pt_load_rom: Remove unused includes 2020-02-27 11:50:30 +00:00
xen_pt_msi.c xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
xen_pvdev.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00