From patchwork Thu May 27 05:37:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 53691 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BF2C9B7D29 for ; Thu, 27 May 2010 16:13:35 +1000 (EST) Received: from localhost ([127.0.0.1]:41342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHWLU-0005JZ-AG for incoming@patchwork.ozlabs.org; Thu, 27 May 2010 02:13:32 -0400 Received: from [140.186.70.92] (port=38408 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHW3h-0003LI-Qi for qemu-devel@nongnu.org; Thu, 27 May 2010 01:55:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHVpY-0003bp-6p for qemu-devel@nongnu.org; Thu, 27 May 2010 01:40:33 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:36982) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHVpX-0003bi-MH for qemu-devel@nongnu.org; Thu, 27 May 2010 01:40:32 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id A0AEA1867D; Thu, 27 May 2010 14:40:30 +0900 (JST) Received: (nullmailer pid 13234 invoked by uid 1000); Thu, 27 May 2010 05:37:09 -0000 Date: Thu, 27 May 2010 14:37:09 +0900 From: Isaku Yamahata To: qemu-devel@nongnu.org Message-ID: <20100527053709.GB31807@valinux.co.jp> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [Qemu-devel] [PATCH] multiboot: compilation fix with DEBUG_MULTIBOOT enabled. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch fixes the following compilation errors in multiboot.c when DEBUG_MULTIBOOT is defined. Use TARGET_FMT_plx instead of %x for target_phys_addr_t. CC i386-softmmu/multiboot.o cc1: warnings being treated as errors qemu/hw/multiboot.c: In function 'mb_add_mod': qemu/hw/multiboot.c:121: error: format '%08x' expects type 'unsigned int', but argument 4 has type 'target_phys_addr_t' qemu/hw/multiboot.c:121: error: format '%08x' expects type 'unsigned int', but argument 5 has type 'target_phys_addr_t' qemu/hw/multiboot.c: In function 'load_multiboot': qemu/hw/multiboot.c:279: error: format '%#x' expects type 'unsigned int', but argument 5 has type 'target_phys_addr_t' qemu/hw/multiboot.c:307: error: format '%x' expects type 'unsigned int', but argument 3 has type 'target_phys_addr_t' qemu/hw/multiboot.c:308: error: format '%x' expects type 'unsigned int', but argument 3 has type 'target_phys_addr_t' make[1]: *** [multiboot.o] Error 1 Signed-off-by: Isaku Yamahata --- hw/multiboot.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/multiboot.c b/hw/multiboot.c index a1b665c..dc980e6 100644 --- a/hw/multiboot.c +++ b/hw/multiboot.c @@ -118,7 +118,8 @@ static void mb_add_mod(MultibootState *s, stl_p(p + MB_MOD_END, end); stl_p(p + MB_MOD_CMDLINE, cmdline_phys); - mb_debug("mod%02d: %08x - %08x\n", s->mb_mods_count, start, end); + mb_debug("mod%02d: "TARGET_FMT_plx" - "TARGET_FMT_plx"\n", + s->mb_mods_count, start, end); s->mb_mods_count++; } @@ -276,7 +277,7 @@ int load_multiboot(void *fw_cfg, mb_add_mod(&mbs, mbs.mb_buf_phys + offs, mbs.mb_buf_phys + offs + mb_mod_length, c); - mb_debug("mod_start: %p\nmod_end: %p\n cmdline: %#x\n", + mb_debug("mod_start: %p\nmod_end: %p\n cmdline: "TARGET_FMT_plx"\n", (char *)mbs.mb_buf + offs, (char *)mbs.mb_buf + offs + mb_mod_length, c); initrd_filename = next_initrd+1; @@ -304,8 +305,8 @@ int load_multiboot(void *fw_cfg, stl_p(bootinfo + MBI_MMAP_ADDR, ADDR_E820_MAP); mb_debug("multiboot: mh_entry_addr = %#x\n", mh_entry_addr); - mb_debug(" mb_buf_phys = %x\n", mbs.mb_buf_phys); - mb_debug(" mod_start = %x\n", mbs.mb_buf_phys + mbs.offset_mods); + mb_debug(" mb_buf_phys = "TARGET_FMT_plx"\n", mbs.mb_buf_phys); + mb_debug(" mod_start = "TARGET_FMT_plx"\n", mbs.mb_buf_phys + mbs.offset_mods); mb_debug(" mb_mods_count = %d\n", mbs.mb_mods_count); /* save bootinfo off the stack */