[PATCH] of_platform_make_bus_id(): kill compiler warning
Kumar Gala
galak at kernel.crashing.org
Fri Dec 8 02:36:57 EST 2006
On Dec 7, 2006, at 9:29 AM, Geert Uytterhoeven wrote:
>
> 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>
I think its better to change magic to type int. atomic_add_return is
going to return an int so magic this %ld on ppc32 has to value.
- k
> 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_______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-
> dev_______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
More information about the Linuxppc-dev
mailing list