All of lore.kernel.org
 help / color / mirror / Atom feed
* [kexec patch 1/2] Fix build warnings
@ 2008-09-11  1:40 Geoff Levand
  2008-09-11 23:30 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Geoff Levand @ 2008-09-11  1:40 UTC (permalink / raw)
  To: horms; +Cc: kexec, Cell Broadband Engine OSS Development

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 <geoffrey.levand@am.sony.com>
---
 kexec/crashdump-elf.c   |    8 ++++++--
 kexec/firmware_memmap.c |    2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

--- 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;
 		}




_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [kexec patch 1/2] Fix build warnings
  2008-09-11  1:40 [kexec patch 1/2] Fix build warnings Geoff Levand
@ 2008-09-11 23:30 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2008-09-11 23:30 UTC (permalink / raw)
  To: Geoff Levand; +Cc: kexec, Cell Broadband Engine OSS Development

On Wed, Sep 10, 2008 at 06:40:42PM -0700, Geoff Levand wrote:
> 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. 

Thanks Geoff, applied.

-- 
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-11 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-11  1:40 [kexec patch 1/2] Fix build warnings Geoff Levand
2008-09-11 23:30 ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.