[PATCH] of_platform_make_bus_id(): kill compiler warning

Geert Uytterhoeven Geert.Uytterhoeven at sonycom.com
Fri Dec 8 02:29:48 EST 2006


of_platform_make_bus_id(): Kill a compiler warning which is a real bug on
PPC64: format ‘%d’ expects type ‘int’, but argument 5 has type ‘long int’

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

Index: ps3-linux-src/arch/powerpc/kernel/of_platform.c
===================================================================
--- ps3-linux-src.orig/arch/powerpc/kernel/of_platform.c	2006-12-05 11:16:13.000000000 +0100
+++ ps3-linux-src/arch/powerpc/kernel/of_platform.c	2006-12-07 16:24:26.000000000 +0100
@@ -212,7 +212,7 @@ static void of_platform_make_bus_id(stru
 	 * 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,

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
-------------- next part --------------
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


More information about the Linuxppc-dev mailing list