hw/riscv/sifive_u.c: remove unneeded qemu_fdt_get_phandle() call
create_fdt() has the following code sequence: plic_phandle = phandle++; (...) qemu_fdt_setprop_cell(fdt, nodename, "phandle", plic_phandle); plic_phandle = qemu_fdt_get_phandle(fdt, nodename); What this is doing is assigning a value to plic_phandle, then use that as phandle of "nodename", and then fetching the phandle of "nodename" again in the same variable that already had the right phandle val. Here's how it looks like in gdb: Thread 1 "qemu-system-ris" hit Breakpoint 1, create_fdt (s=0xaaaaac162a30, memmap=0xaaaaab8f70c8 <sifive_u_memmap>, is_32_bit=false) at ../hw/riscv/sifive_u.c:199 199 plic_phandle = phandle++; (gdb) n 200 cells = g_new0(uint32_t, ms->smp.cpus * 4 - 2); (gdb) p plic_phandle $3 = 12 (gdb) c Continuing. Thread 1 "qemu-system-ris" hit Breakpoint 2, create_fdt (s=0xaaaaac162a30, memmap=0xaaaaab8f70c8 <sifive_u_memmap>, is_32_bit=false) at ../hw/riscv/sifive_u.c:232 232 plic_phandle = qemu_fdt_get_phandle(fdt, nodename); (gdb) n 233 g_free(cells); (gdb) p plic_phandle $4 = 12 (gdb) Remove the extra qemu_fdt_get_phandle() call. Signed-off-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20260616235939.1358663-2-daniel.barboza@oss.qualcomm.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>