ARM: fix compile warning in mm/init.c

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Nov 12 02:40:32 EST 2010


On Fri, Nov 12, 2010 at 11:49:13AM +0530, Anand Gadiyar wrote:
> Commit 7c63984b86 (ARM: do not define VMALLOC_END relative to PAGE_OFFSET)
> changed VMALLOC_END to be an explicit value. Before this, it was
> relative to PAGE_OFFSET and therefore automatically upgraded to
> unsigned long as PAGE_OFFSET was an unsigned long. This introduced
> the following build warning. Fix this.
> 
>   CC      arch/arm/mm/init.o
> arch/arm/mm/init.c: In function 'mem_init':
> arch/arm/mm/init.c:606: warning: format '%08lx' expects type 'long unsigned int', but argument 12 has type 'unsigned int'
> 
> Signed-off-by: Anand Gadiyar <gadiyar at ti.com>
> Cc: Nicolas Pitre <nico at fluxnic.net>
> ---
>  arch/arm/mm/init.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: ehci/arch/arm/mm/init.c
> ===================================================================
> --- ehci.orig/arch/arm/mm/init.c
> +++ ehci/arch/arm/mm/init.c
> @@ -593,7 +593,7 @@ void __init mem_init(void)
>  #ifdef CONFIG_MMU
>  			MLM(CONSISTENT_BASE, CONSISTENT_END),
>  #endif
> -			MLM(VMALLOC_START, VMALLOC_END),
> +			MLM(VMALLOC_START, (unsigned long)VMALLOC_END),
I wonder if this is the only place where this is a problem.  Maybe it's
better to make the defined value of all VMALLOC_END an unsigned long as
some already are?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list