From patchwork Thu Feb 4 21:52:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 8228131 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4E6A2BEEE5 for ; Thu, 4 Feb 2016 22:04:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1E6C203A0 for ; Thu, 4 Feb 2016 22:04:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0225202F2 for ; Thu, 4 Feb 2016 22:04:56 +0000 (UTC) Received: from localhost ([::1]:44368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRS1I-0004pB-50 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 04 Feb 2016 17:04:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRRpj-0007gS-Hv for qemu-devel@nongnu.org; Thu, 04 Feb 2016 16:53:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRRpi-0005We-Ka for qemu-devel@nongnu.org; Thu, 04 Feb 2016 16:52:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRRpi-0005WX-FD for qemu-devel@nongnu.org; Thu, 04 Feb 2016 16:52:58 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 0B81D70012; Thu, 4 Feb 2016 21:52:58 +0000 (UTC) Received: from redhat.com (vpn1-4-163.ams2.redhat.com [10.36.4.163]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id u14LqsoV010230; Thu, 4 Feb 2016 16:52:55 -0500 Date: Thu, 4 Feb 2016 23:52:54 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1454612376-7072-30-git-send-email-mst@redhat.com> References: <1454612376-7072-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1454612376-7072-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Marcel Apfelbaum , Peter Maydell , Richard Henderson , Eduardo Habkost , Paolo Bonzini Subject: [Qemu-devel] [PULL 29/49] pc: Simplify xen_load_linux() signature X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eduardo Habkost We can get the PcGuestInfo struct directly from PCMachineState, and the return value is not needed at all. Signed-off-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/i386/pc.h | 3 +-- hw/i386/pc.c | 5 ++--- hw/i386/pc_piix.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 5b21d01..223621a 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -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, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index fbdad88..9745dca 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -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, diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index ad51fd6..4262c32 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -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));