diff options
author | Greg Kurz | 2020-10-19 10:49:01 +0200 |
---|---|---|
committer | David Gibson | 2020-10-27 15:08:53 +0100 |
commit | 6e837f98ba03bab8008b7c1a6c125298ce41de7a (patch) | |
tree | 5f9ca0f20e5c00fb8140e807c5193512bdb7c3fd /include/hw/ppc/spapr_nvdimm.h | |
parent | spapr: Pass &error_abort when getting some PC DIMM properties (diff) | |
download | qemu-6e837f98ba03bab8008b7c1a6c125298ce41de7a.tar.gz qemu-6e837f98ba03bab8008b7c1a6c125298ce41de7a.tar.xz qemu-6e837f98ba03bab8008b7c1a6c125298ce41de7a.zip |
spapr: Simplify error handling in spapr_memory_plug()
As recommended in "qapi/error.h", add a bool return value to
spapr_add_lmbs() and spapr_add_nvdimm(), and use them instead
of local_err in spapr_memory_plug().
This allows to get rid of the error propagation overhead.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <160309734178.2739814.3488437759887793902.stgit@bahia.lan>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr_nvdimm.h')
-rw-r--r-- | include/hw/ppc/spapr_nvdimm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/ppc/spapr_nvdimm.h b/include/hw/ppc/spapr_nvdimm.h index 490b19a009..344582d2f5 100644 --- a/include/hw/ppc/spapr_nvdimm.h +++ b/include/hw/ppc/spapr_nvdimm.h @@ -30,6 +30,6 @@ int spapr_pmem_dt_populate(SpaprDrc *drc, SpaprMachineState *spapr, void spapr_dt_persistent_memory(SpaprMachineState *spapr, void *fdt); bool spapr_nvdimm_validate(HotplugHandler *hotplug_dev, NVDIMMDevice *nvdimm, uint64_t size, Error **errp); -void spapr_add_nvdimm(DeviceState *dev, uint64_t slot, Error **errp); +bool spapr_add_nvdimm(DeviceState *dev, uint64_t slot, Error **errp); #endif |