diff options
author | Greg Kurz <groug@kaod.org> | 2017-10-03 16:13:11 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-10-17 10:34:00 +1100 |
commit | a4f3885c7496fa3c5af8ad849f2ec55d9214d66c (patch) | |
tree | 4a6f9089538d8367203f6008a59eb4546f0b2cb1 /hw/ppc/spapr.c | |
parent | c2a0125a8331ed92adbaaea5f43a71fda678c9b9 (diff) | |
download | qemu-a4f3885c7496fa3c5af8ad849f2ec55d9214d66c.zip qemu-a4f3885c7496fa3c5af8ad849f2ec55d9214d66c.tar.gz qemu-a4f3885c7496fa3c5af8ad849f2ec55d9214d66c.tar.bz2 |
hw/ppc: use 0 instead of fdt_path_offset(fdt, "/")
The offset of the root node is guaranteed to be 0.
This doesn't fix anything, it's just trivial cleanup of the two
remaining places where this was done under hw/ppc.
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index ff87f15..352ff3d 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -353,8 +353,7 @@ static int spapr_fixup_cpu_dt(void *fdt, sPAPRMachineState *spapr) cpus_offset = fdt_path_offset(fdt, "/cpus"); if (cpus_offset < 0) { - cpus_offset = fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"), - "cpus"); + cpus_offset = fdt_add_subnode(fdt, 0, "cpus"); if (cpus_offset < 0) { return cpus_offset; } |