[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node
From: |
David Gibson |
Subject: |
Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node |
Date: |
Fri, 8 Jun 2018 13:28:08 +1000 |
User-agent: |
Mutt/1.9.5 (2018-04-13) |
On Thu, Jun 07, 2018 at 06:52:12PM +0200, David Hildenbrand wrote:
> The node property can always be queried and the value has already been
> verified in pc_dimm_realize().
>
> Signed-off-by: David Hildenbrand <address@hidden>
Acked-by: David Gibson <address@hidden>
> ---
> hw/ppc/spapr.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 2375cbee12..d038f3243e 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -3578,14 +3578,7 @@ 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,
> NULL);
>
> spapr_memory_plug(hotplug_dev, dev, node, errp);
> } else if (object_dynamic_cast(OBJECT(dev), TYPE_SPAPR_CPU_CORE)) {
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [qemu-s390x] [PATCH v1 0/8] pc/spapr/s390x: machine hotplug handler cleanups, David Hildenbrand, 2018/06/07
- [qemu-s390x] [PATCH v1 1/8] pc: local error handling in hotplug handler functions, David Hildenbrand, 2018/06/07
- [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, David Hildenbrand, 2018/06/07
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node,
David Gibson <=
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, Greg Kurz, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, David Hildenbrand, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, Greg Kurz, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, David Hildenbrand, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, Thomas Huth, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, Igor Mammedov, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, David Hildenbrand, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, Igor Mammedov, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, David Hildenbrand, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 2/8] spapr: no need to verify the node, Greg Kurz, 2018/06/08