[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v2 1/6] spapr: no need to verify the node
From: |
David Hildenbrand |
Subject: |
[Qemu-ppc] [PATCH v2 1/6] spapr: no need to verify the node |
Date: |
Fri, 8 Jun 2018 14:48:11 +0200 |
The node property can always be queried and the value has already been
verified in pc_dimm_realize().
Acked-by: David Gibson <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
---
hw/ppc/spapr.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 2375cbee12..f16a0b2870 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3578,14 +3578,8 @@ static void spapr_machine_device_plug(HotplugHandler
*hotplug_dev,
error_setg(errp, "Memory hotplug not supported for this machine");
return;
}
- node = object_property_get_uint(OBJECT(dev), PC_DIMM_NODE_PROP, errp);
- if (*errp) {
- return;
- }
- if (node < 0 || node >= MAX_NODES) {
- error_setg(errp, "Invaild node %d", node);
- return;
- }
+ node = object_property_get_uint(OBJECT(dev), PC_DIMM_NODE_PROP,
+ &error_abort);
spapr_memory_plug(hotplug_dev, dev, node, errp);
} else if (object_dynamic_cast(OBJECT(dev), TYPE_SPAPR_CPU_CORE)) {
--
2.17.0
- [Qemu-ppc] [PATCH v2 0/6] spapr: machine hotplug handler cleanups, David Hildenbrand, 2018/06/08
- [Qemu-ppc] [PATCH v2 1/6] spapr: no need to verify the node,
David Hildenbrand <=
- [Qemu-ppc] [PATCH v2 2/6] spapr: move lookup of the node into spapr_memory_plug(), David Hildenbrand, 2018/06/08
- [Qemu-ppc] [PATCH v2 3/6] spapr: move memory hotplug support check into spapr_memory_pre_plug(), David Hildenbrand, 2018/06/08
- [Qemu-ppc] [PATCH v2 5/6] spapr: handle pc-dimm unplug via hotplug handler chain, David Hildenbrand, 2018/06/08
- [Qemu-ppc] [PATCH v2 4/6] spapr: introduce machine unplug handler, David Hildenbrand, 2018/06/08
- [Qemu-ppc] [PATCH v2 6/6] spapr: handle cpu core unplug via hotplug handler chain, David Hildenbrand, 2018/06/08
- Re: [Qemu-ppc] [PATCH v2 0/6] spapr: machine hotplug handler cleanups, David Gibson, 2018/06/08