[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 44/55] qdev: Drop qdev_realize() support for null bus
From: |
Markus Armbruster |
Subject: |
[PATCH 44/55] qdev: Drop qdev_realize() support for null bus |
Date: |
Tue, 19 May 2020 16:55:40 +0200 |
The "null @bus means main system bus" convenience feature is no longer
used. Drop it.
Signed-off-by: Markus Armbruster <address@hidden>
---
hw/core/qdev.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 8a9e8155d4..323b6328c8 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -408,8 +408,7 @@ void qdev_init_nofail(DeviceState *dev)
/*
* Realize @dev.
* @dev must not be plugged into a bus.
- * Plug @dev into @bus if non-null, else into the main system bus.
- * This takes a reference to @dev.
+ * Plug @dev into @bus. This takes a reference to @dev.
* If @dev has no QOM parent, make one up, taking another reference.
* On success, return true.
* On failure, store an error through @errp and return false.
@@ -419,18 +418,7 @@ bool qdev_realize(DeviceState *dev, BusState *bus, Error
**errp)
Error *err = NULL;
assert(!dev->realized && !dev->parent_bus);
-
- if (!bus) {
- /*
- * Assert that the device really is a SysBusDevice before we
- * put it onto the sysbus. Non-sysbus devices which aren't
- * being put onto a bus should be realized with
- * object_property_set_bool(OBJECT(dev), true, "realized",
- * errp);
- */
- g_assert(object_dynamic_cast(OBJECT(dev), TYPE_SYS_BUS_DEVICE));
- bus = sysbus_get_default();
- }
+ assert(bus);
qdev_set_parent_bus(dev, bus);
--
2.21.1
- [PATCH 38/55] microbit: Tidy up sysbus_init_child_obj() @child argument, (continued)
- [PATCH 16/55] pci: pci_create(), pci_create_multifunction() are now unused, drop, Markus Armbruster, 2020/05/19
- [PATCH 24/55] ssi: ssi_create_slave_no_init() is now unused, drop, Markus Armbruster, 2020/05/19
- [PATCH 10/55] qdev: Convert uses of qdev_set_parent_bus() with Coccinelle, Markus Armbruster, 2020/05/19
- [PATCH 41/55] sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 2, Markus Armbruster, 2020/05/19
- [PATCH 14/55] pci: Convert uses of pci_create() etc. with Coccinelle, Markus Armbruster, 2020/05/19
- [PATCH 44/55] qdev: Drop qdev_realize() support for null bus,
Markus Armbruster <=
- [PATCH 34/55] qom: Less verbose object_initialize_child(), Markus Armbruster, 2020/05/19
- [PATCH 39/55] sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 1, Markus Armbruster, 2020/05/19
- [PATCH 40/55] hw/arm/armsse: Pass correct child size to sysbus_init_child_obj(), Markus Armbruster, 2020/05/19
- [PATCH 49/55] sysbus: sysbus_init_child_obj() is now unused, drop, Markus Armbruster, 2020/05/19
- [PATCH 03/55] qdev: New qdev_new(), qdev_realize(), etc., Markus Armbruster, 2020/05/19