[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 25/33] spapr: no need to verify the node
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 25/33] spapr: no need to verify the node |
Date: |
Tue, 12 Jun 2018 16:44:55 +1000 |
From: David Hildenbrand <address@hidden>
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>
Signed-off-by: David Gibson <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.1
- [Qemu-ppc] [PULL 19/33] cuda: embed mos6522_cuda device directly rather than using QOM object link, (continued)
- [Qemu-ppc] [PULL 19/33] cuda: embed mos6522_cuda device directly rather than using QOM object link, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 22/33] target/ppc: extend eieio for POWER9, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 18/33] mos6522: fix vmstate_mos6522_timer version in vmstate_mos6522, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 29/33] spapr: handle pc-dimm unplug via hotplug handler chain, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 30/33] spapr: handle cpu core unplug via hotplug handler chain, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 31/33] ppc/pnv: fix LPC HC firmware address space, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 21/33] mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTATE_TIMER_PTR, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 26/33] spapr: move lookup of the node into spapr_memory_plug(), David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 33/33] spapr_pci: Remove unhelpful pagesize warning, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 24/33] target/ppc: Allow PIR read in privileged mode, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 25/33] spapr: no need to verify the node,
David Gibson <=
- [Qemu-ppc] [PULL 23/33] ppc4xx_i2c: Clean up and improve error logging, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 32/33] xics_kvm: use KVM helpers, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 27/33] spapr: move memory hotplug support check into spapr_memory_pre_plug(), David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 28/33] spapr: introduce machine unplug handler, David Gibson, 2018/06/12
- Re: [Qemu-ppc] [PULL 00/33] ppc-for-3.0 queue 20180612, Peter Maydell, 2018/06/12