Commit 7bc35e0f authored by Eduardo Habkost's avatar Eduardo Habkost Committed by Michael S. Tsirkin
Browse files

pc: Simplify xen_load_linux() signature



We can get the PcGuestInfo struct directly from PCMachineState,
and the return value is not needed at all.

Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: default avatarMarcel Apfelbaum <marcel@redhat.com>
parent 5934e216
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1255,11 +1255,11 @@ void pc_acpi_init(const char *default_dsdt)
    }
}

FWCfgState *xen_load_linux(PCMachineState *pcms,
                           PcGuestInfo *guest_info)
void xen_load_linux(PCMachineState *pcms)
{
    int i;
    FWCfgState *fw_cfg;
    PcGuestInfo *guest_info = &pcms->acpi_guest_info;

    assert(MACHINE(pcms)->kernel_filename != NULL);

@@ -1273,7 +1273,6 @@ FWCfgState *xen_load_linux(PCMachineState *pcms,
        rom_add_option(option_rom[i].name, option_rom[i].bootindex);
    }
    guest_info->fw_cfg = fw_cfg;
    return fw_cfg;
}

void pc_memory_init(PCMachineState *pcms,
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ static void pc_init1(MachineState *machine,
                       rom_memory, &ram_memory);
    } else if (machine->kernel_filename != NULL) {
        /* For xen HVM direct kernel boot, load linux here */
        xen_load_linux(pcms, guest_info);
        xen_load_linux(pcms);
    }

    gsi_state = g_malloc0(sizeof(*gsi_state));
+1 −2
Original line number Diff line number Diff line
@@ -248,8 +248,7 @@ PcGuestInfo *pc_guest_info_init(PCMachineState *pcms);
void pc_pci_as_mapping_init(Object *owner, MemoryRegion *system_memory,
                            MemoryRegion *pci_address_space);

FWCfgState *xen_load_linux(PCMachineState *pcms,
                           PcGuestInfo *guest_info);
void xen_load_linux(PCMachineState *pcms);
void pc_memory_init(PCMachineState *pcms,
                    MemoryRegion *system_memory,
                    MemoryRegion *rom_memory,