[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RESEND v3 57/58] qdev: qdev_init_nofail() is now unused, drop
From: |
Markus Armbruster |
Subject: |
[PATCH RESEND v3 57/58] qdev: qdev_init_nofail() is now unused, drop |
Date: |
Wed, 10 Jun 2020 07:32:46 +0200 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/hw/qdev-core.h | 3 +--
hw/core/qdev.c | 29 -----------------------------
2 files changed, 1 insertion(+), 31 deletions(-)
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index ef6137b6a8..7dc10be46f 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -57,7 +57,7 @@ typedef void (*BusUnrealize)(BusState *bus);
* After successful realization, setting static properties will fail.
*
* As an interim step, the #DeviceState:realized property can also be
- * set with qdev_realize() or qdev_init_nofail().
+ * set with qdev_realize().
* In the future, devices will propagate this state change to their children
* and along busses they expose.
* The point in time will be deferred to machine creation, so that values
@@ -322,7 +322,6 @@ compat_props_add(GPtrArray *arr,
DeviceState *qdev_new(const char *name);
DeviceState *qdev_try_new(const char *name);
-void qdev_init_nofail(DeviceState *dev);
bool qdev_realize(DeviceState *dev, BusState *bus, Error **errp);
bool qdev_realize_and_unref(DeviceState *dev, BusState *bus, Error **errp);
void qdev_unrealize(DeviceState *dev);
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 50336168f2..2131c7f951 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -376,35 +376,6 @@ void qdev_simple_device_unplug_cb(HotplugHandler
*hotplug_dev,
qdev_unrealize(dev);
}
-/*
- * Realize @dev.
- * Device properties should be set before calling this function. IRQs
- * and MMIO regions should be connected/mapped after calling this
- * function.
- * On failure, report an error with error_report() and terminate the
- * program. This is okay during machine creation. Don't use for
- * hotplug, because there callers need to recover from failure.
- * Exception: if you know the device's init() callback can't fail,
- * then qdev_init_nofail() can't fail either, and is therefore usable
- * even then. But relying on the device implementation that way is
- * somewhat unclean, and best avoided.
- */
-void qdev_init_nofail(DeviceState *dev)
-{
- Error *err = NULL;
-
- assert(!dev->realized);
-
- object_ref(OBJECT(dev));
- object_property_set_bool(OBJECT(dev), true, "realized", &err);
- if (err) {
- error_reportf_err(err, "Initialization of device %s failed: ",
- object_get_typename(OBJECT(dev)));
- exit(1);
- }
- object_unref(OBJECT(dev));
-}
-
/*
* Realize @dev.
* @dev must not be plugged into a bus.
--
2.26.2
- [PATCH RESEND v3 35/58] qom: Tidy up a few object_initialize_child() calls, (continued)
- [PATCH RESEND v3 35/58] qom: Tidy up a few object_initialize_child() calls, Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 38/58] macio: Eliminate macio_init_child_obj(), Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 34/58] auxbus: Eliminate aux_create_slave(), Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 31/58] auxbus: Rename aux_init_bus() to aux_bus_init(), Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 23/58] ssi: Convert uses of ssi_create_slave_no_init() with Coccinelle, Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 04/58] qdev: New qdev_new(), qdev_realize(), etc., Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 52/58] microbit: Eliminate two local variables in microbit_init(), Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 58/58] MAINTAINERS: Make section QOM cover hw/core/*bus.c as well, Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 57/58] qdev: qdev_init_nofail() is now unused, drop,
Markus Armbruster <=
- [PATCH RESEND v3 36/58] qom: Less verbose object_initialize_child(), Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 27/58] usb: Convert uses of usb_create(), Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 16/58] pci: Convert uses of pci_create() etc. manually, Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 55/58] qdev: Use qdev_realize() in qdev_device_add(), Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 47/58] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 1, Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 53/58] s390x/event-facility: Simplify creation of SCLP event devices, Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 49/58] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 3, Markus Armbruster, 2020/06/10
- [PATCH RESEND v3 56/58] qdev: Convert bus-less devices to qdev_realize() with Coccinelle, Markus Armbruster, 2020/06/10