On 3/2/23 19:08, Philippe Mathieu-Daudé wrote:
QEMU provides the QOM API for core objects.
Devices are modelled on top of QOM as QDev objects.
There is no point in using the lower level QOM API with
QDev; it makes the code more complex and harder to review.
I first converted all the calls using errp=&error_abort or
&errp=NULL, then noticed the other uses weren't really
consistent.
A QDev property defined with the DEFINE_PROP_xxx() macros
is always available, thus can't fail. When using hot-plug
devices, we only need to check for optional properties
registered at runtime with the object_property_add_XXX()
API. Some are even always registered in device instance_init.
I have probably been overzealous, so I tagged the patches
not using errp=&error_abort|&error_fatal|NULL as RFC.
PPC and ARM conversions will follow as two different series.
46 files changed, 155 insertions(+), 221 deletions(-)
Forgot to mention, this is based on
https://lore.kernel.org/qemu-devel/20230203163021.35754-1-phi...@linaro.org/
"hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'"
Based-on: <20230203163021.35754-1-phi...@linaro.org>