]> Git Repo - qemu.git/commitdiff
pc: Simplify xen_load_linux() signature
authorEduardo Habkost <[email protected]>
Fri, 11 Dec 2015 18:42:25 +0000 (16:42 -0200)
committerMichael S. Tsirkin <[email protected]>
Sat, 6 Feb 2016 18:44:09 +0000 (20:44 +0200)
We can get the PcGuestInfo struct directly from PCMachineState,
and the return value is not needed at all.

Signed-off-by: Eduardo Habkost <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
hw/i386/pc.c
hw/i386/pc_piix.c
include/hw/i386/pc.h

index fbdad8813f304b7fd7ecaf5795748b6ee6bef53a..9745dcaec4b7a3d722b9f8e87195b97543d935b2 100644 (file)
@@ -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,
index ad51fd674b68a59b5e1cd5b9d08c96dcbf51d035..4262c3257547202ea10d692516f1de75c61cb56d 100644 (file)
@@ -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));
index 5b21d0120d8d78d5313a6942c5b10be965750c8b..223621a30cac1d5b46ac61e932cb92f5691fa8c0 100644 (file)
@@ -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,
This page took 0.030607 seconds and 4 git commands to generate.