From: Valentin Longchamp Date: Fri, 18 Oct 2013 09:47:14 +0000 (+0200) Subject: powerpc: cast bi_memsize to ulong for %ld usage X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=13287e3d47e40dd0b6cbcbae19fe705617fc42d9;p=u-boot.git powerpc: cast bi_memsize to ulong for %ld usage When exporting the new memsize without reserved PRAM area, the -Wformat option produces a warning since %ld is used for snprintf and bi_memsize is phys_size_t. This patch removes this warning for all PRAM PowerPC boards. Signed-off-by: Valentin Longchamp --- diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index a101e03601..34bbfca554 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -984,7 +984,7 @@ void board_init_r(gd_t *id, ulong dest_addr) pram += (LOGBUFF_LEN + LOGBUFF_OVERHEAD) / 1024; #endif #endif - sprintf(memsz, "%ldk", (bd->bi_memsize / 1024) - pram); + sprintf(memsz, "%ldk", (ulong) (bd->bi_memsize / 1024) - pram); setenv("mem", memsz); } #endif