From patchwork Wed Oct 24 17:49:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 193910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A7B3D2C0172 for ; Thu, 25 Oct 2012 05:34:56 +1100 (EST) Received: from localhost ([::1]:59871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR557-0001cO-4I for incoming@patchwork.ozlabs.org; Wed, 24 Oct 2012 13:49:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR54M-0008K3-Jj for qemu-devel@nongnu.org; Wed, 24 Oct 2012 13:48:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR54K-0002r1-HH for qemu-devel@nongnu.org; Wed, 24 Oct 2012 13:48:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR54K-0002qY-7r for qemu-devel@nongnu.org; Wed, 24 Oct 2012 13:48:40 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9OHmdep027680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Oct 2012 13:48:39 -0400 Received: from blackpad.lan.raisama.net (vpn1-4-109.gru2.redhat.com [10.97.4.109]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q9OHmcDR009561; Wed, 24 Oct 2012 13:48:38 -0400 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id DACA82033D7; Wed, 24 Oct 2012 15:50:08 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 24 Oct 2012 15:49:48 -0200 Message-Id: <1351101001-14589-15-git-send-email-ehabkost@redhat.com> In-Reply-To: <1351101001-14589-1-git-send-email-ehabkost@redhat.com> References: <1351101001-14589-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paolo Bonzini Subject: [Qemu-devel] [PATCH 14/27] pc: use FWCfgState* instead of void* for fw_cfg data 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org I don't know why the code uses void* if the FWCfgState typedef is declared at the same header where fw_cfg_init() and other fw_cfg_*() functions are declared. This changes the code to use FWCfgState* instead of void* in the PC initialization code. Signed-off-by: Eduardo Habkost --- hw/pc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index dce9ce1..4e971c8 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -570,9 +570,9 @@ int e820_add_entry(uint64_t address, uint64_t length, uint32_t type) return index; } -static void *bochs_bios_init(void) +static FWCfgState *bochs_bios_init(void) { - void *fw_cfg; + FWCfgState *fw_cfg; uint8_t *smbios_table; size_t smbios_len; uint64_t *numa_fw_cfg; @@ -638,7 +638,7 @@ static long get_file_size(FILE *f) return size; } -static void load_linux(void *fw_cfg, +static void load_linux(FWCfgState *fw_cfg, const char *kernel_filename, const char *initrd_filename, const char *kernel_cmdline, @@ -881,7 +881,7 @@ void *pc_memory_init(PCInitArgs *args) int linux_boot, i; MemoryRegion *ram, *option_rom_mr; MemoryRegion *ram_below_4g, *ram_above_4g; - void *fw_cfg; + FWCfgState *fw_cfg; linux_boot = (args->qemu_args->kernel_filename != NULL);