From: Joel Stanley <[email protected]> The machine state carries around the FDT size which isn't used by anything.
Reviewed-by: Daniel Henrique Barboza <[email protected]> Reviewed-by: Alistair Francis <[email protected]> Signed-off-by: Joel Stanley <[email protected]> Message-ID: <[email protected]> Signed-off-by: Alistair Francis <[email protected]> --- include/hw/riscv/tt_atlantis.h | 2 -- hw/riscv/tt_atlantis.c | 9 +++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/hw/riscv/tt_atlantis.h b/include/hw/riscv/tt_atlantis.h index c9308aa570..d0cca3b024 100644 --- a/include/hw/riscv/tt_atlantis.h +++ b/include/hw/riscv/tt_atlantis.h @@ -33,8 +33,6 @@ struct TTAtlantisState { DeviceState *irqchip; DesignWareI2CState i2c[TT_ATL_NUM_I2C]; UnimplementedDeviceState uart1; - - int fdt_size; }; enum { diff --git a/hw/riscv/tt_atlantis.c b/hw/riscv/tt_atlantis.c index 6e1e50aaf6..c682bb6848 100644 --- a/hw/riscv/tt_atlantis.c +++ b/hw/riscv/tt_atlantis.c @@ -366,10 +366,10 @@ static void finalize_fdt(TTAtlantisState *s) static void create_fdt(TTAtlantisState *s) { MachineState *ms = MACHINE(s); + int fdt_size = 0; - ms->fdt = riscv_create_board_device_tree( - "Tenstorrent Atlantis RISC-V Machine", - "tenstorrent,atlantis", &s->fdt_size); + ms->fdt = riscv_create_board_device_tree("Tenstorrent Atlantis RISC-V Machine", + "tenstorrent,atlantis", &fdt_size); qemu_fdt_add_subnode(ms->fdt, "/chosen"); @@ -385,8 +385,9 @@ static void load_fdt(TTAtlantisState *s) MachineState *ms = MACHINE(s); char **node_path; Error *err = NULL; + int fdt_size = 0; - ms->fdt = load_device_tree(ms->dtb, &s->fdt_size); + ms->fdt = load_device_tree(ms->dtb, &fdt_size); if (!ms->fdt) { error_report("load_device_tree() failed"); exit(1); -- 2.55.0
