[PATCH] Kill a few compiler warnings

Geert Uytterhoeven Geert.Uytterhoeven at sonycom.com
Fri Nov 24 04:06:00 EST 2006


Kill a few compiler warnings:
  o format ‘%d’ expects type ‘int’, but argument 5 has type ‘long int’
  o implicit declaration of function ‘sys_mmap’

Signed-Off-By: Geert Uytterhoeven <Geert.Uytterhoeven at sonycom.com>

---
 arch/powerpc/kernel/of_platform.c |    2 +-
 arch/powerpc/kernel/sys_ppc32.c   |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

--- ps3-linux-src.orig/arch/powerpc/kernel/of_platform.c
+++ ps3-linux-src/arch/powerpc/kernel/of_platform.c
@@ -212,7 +212,7 @@
 	 * counter (and pray...)
 	 */
 	magic = atomic_add_return(1, &bus_no_reg_magic);
-	snprintf(name, BUS_ID_SIZE, "%s.%d", node->name, magic - 1);
+	snprintf(name, BUS_ID_SIZE, "%s.%ld", node->name, magic - 1);
 }
 
 struct of_device* of_platform_device_create(struct device_node *np,
--- ps3-linux-src.orig/arch/powerpc/kernel/sys_ppc32.c
+++ ps3-linux-src/arch/powerpc/kernel/sys_ppc32.c
@@ -51,6 +51,7 @@
 #include <asm/time.h>
 #include <asm/mmu_context.h>
 #include <asm/ppc-pci.h>
+#include <asm/syscalls.h>
 
 /* readdir & getdents */
 #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))


Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven at sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium


More information about the Linuxppc-dev mailing list