'mem_size' and 'cmdline' aren't being used and the MachineState pointer is being retrieved via a MACHINE() macro.
Remove 'mem_size' and 'cmdline' and add MachineState as a parameter. Signed-off-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com> --- hw/riscv/virt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 11c903a212..b13299cee8 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -998,10 +998,9 @@ static void create_fdt_fw_cfg(RISCVVirtState *s, const MemMapEntry *memmap) g_free(nodename); } -static void create_fdt(RISCVVirtState *s, const MemMapEntry *memmap, - uint64_t mem_size, const char *cmdline, bool is_32_bit) +static void create_fdt(MachineState *mc, RISCVVirtState *s, + const MemMapEntry *memmap, bool is_32_bit) { - MachineState *mc = MACHINE(s); uint32_t phandle = 1, irq_mmio_phandle = 1, msi_pcie_phandle = 1; uint32_t irq_pcie_phandle = 1, irq_virtio_phandle = 1; uint8_t rng_seed[32]; @@ -1498,8 +1497,7 @@ static void virt_machine_init(MachineState *machine) virt_flash_map(s, system_memory); /* create device tree */ - create_fdt(s, memmap, machine->ram_size, machine->kernel_cmdline, - riscv_is_32bit(&s->soc[0])); + create_fdt(machine, s, memmap, riscv_is_32bit(&s->soc[0])); s->machine_done.notify = virt_machine_done; qemu_add_machine_init_done_notifier(&s->machine_done); -- 2.38.1