From patchwork Thu Sep 11 01:40:42 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 234 Return-Path: X-Original-To: patchwork@ozlabs.org Delivered-To: patchwork@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id DFCE9DE155 for ; Thu, 11 Sep 2008 11:41:13 +1000 (EST) X-Original-To: cbe-oss-dev@ozlabs.org Delivered-To: cbe-oss-dev@ozlabs.org Received: from WA4EHSOBE006.bigfish.com (outbound-wa4.frontbridge.com [216.32.181.16]) by ozlabs.org (Postfix) with ESMTP id ABC39DDFF7 for ; Thu, 11 Sep 2008 11:40:48 +1000 (EST) Received: from mail207-wa4-R.bigfish.com (10.8.14.246) by WA4EHSOBE006.bigfish.com (10.8.40.26) with Microsoft SMTP Server id 8.1.291.1; Thu, 11 Sep 2008 01:40:45 +0000 Received: from mail207-wa4 (localhost.localdomain [127.0.0.1]) by mail207-wa4-R.bigfish.com (Postfix) with ESMTP id 611C9898585; Thu, 11 Sep 2008 01:40:45 +0000 (UTC) X-BigFish: VPS1(zzzz10d3izzz2fh6bh61h) X-Spam-TCS-SCL: 0:0 X-FB-SS: 5, Received: by mail207-wa4 (MessageSwitch) id 1221097243986264_13881; Thu, 11 Sep 2008 01:40:43 +0000 (UCT) Received: from mail8.fw-sd.sony.com (mail8.fw-sd.sony.com [160.33.66.75]) by mail207-wa4.bigfish.com (Postfix) with ESMTP id BB2D7448074; Thu, 11 Sep 2008 01:40:43 +0000 (UTC) Received: from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com [43.134.1.211]) by mail8.fw-sd.sony.com (8.14.2/8.14.2) with ESMTP id m8B1ehhh001524; Thu, 11 Sep 2008 01:40:43 GMT Received: from USSDIXIM01.am.sony.com (ussdixim01.am.sony.com [43.130.140.33]) by mail3.sjc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id m8B1ehBi001777; Thu, 11 Sep 2008 01:40:43 GMT Received: from ussdixms03.am.sony.com ([43.130.140.23]) by USSDIXIM01.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 10 Sep 2008 18:40:42 -0700 Received: from [192.168.1.10] ([43.135.148.226]) by ussdixms03.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 10 Sep 2008 18:40:42 -0700 Message-ID: <48C8771A.2000806@am.sony.com> Date: Wed, 10 Sep 2008 18:40:42 -0700 From: Geoff Levand User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: horms@verge.net.au X-Enigmail-Version: 0.95.7 X-OriginalArrivalTime: 11 Sep 2008 01:40:42.0573 (UTC) FILETIME=[670AB7D0:01C913AF] X-SEL-encryption-scan: scanned Cc: kexec@lists.infradead.org, Cell Broadband Engine OSS Development Subject: [Cbe-oss-dev] [kexec patch 1/2] Fix build warnings X-BeenThere: cbe-oss-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Discussion about Open Source Software for the Cell Broadband Engine List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org Errors-To: cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org Fix these 64 bit build warnings: kexec/firmware_memmap.c:241: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'Elf64_Off' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'Elf64_Addr' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'Elf64_Addr' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 7 has type 'Elf64_Xword' kexec/crashdump-elf.c:160: warning: format '%llx' expects type 'long long unsigned int', but argument 8 has type 'Elf64_Xword' Tested on PS3 (ppc64) with 32 and 64 bit builds. Signed-off-by: Geoff Levand --- a/kexec/crashdump-elf.c +++ b/kexec/crashdump-elf.c @@ -8,8 +8,12 @@ do { \ dbgprintf("%s: p_type = %u, p_offset = 0x%llx p_paddr = 0x%llx " \ "p_vaddr = 0x%llx p_filesz = 0x%llx p_memsz = 0x%llx\n", \ - (prefix), (phdr)->p_type, (phdr)->p_offset, (phdr)->p_paddr, \ - (phdr)->p_vaddr, (phdr)->p_filesz, (phdr)->p_memsz); \ + (prefix), (phdr)->p_type, \ + (unsigned long long)((phdr)->p_offset), \ + (unsigned long long)((phdr)->p_paddr), \ + (unsigned long long)((phdr)->p_vaddr), \ + (unsigned long long)((phdr)->p_filesz), \ + (unsigned long long)((phdr)->p_memsz)); \ } while(0) #else #define dbgprintf_phdr(prefix, phdr) \ --- a/kexec/firmware_memmap.c +++ b/kexec/firmware_memmap.c @@ -237,7 +237,7 @@ int get_firmware_memmap_ranges(struct me /* array overflow check */ if ((size_t)i >= *ranges) { fprintf(stderr, "The firmware provides more entries " - "allowed (%d). Please report that as bug.\n", + "allowed (%zd). Please report that as bug.\n", *ranges); goto error; }