diff options
author | Valentin Longchamp <valentin.longchamp@keymile.com> | 2013-10-18 11:47:14 +0200 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2013-10-24 09:35:15 -0700 |
commit | 13287e3d47e40dd0b6cbcbae19fe705617fc42d9 (patch) | |
tree | bd3e0aeff31e888b4cb8f44920198e849e47443b /arch/powerpc | |
parent | 77354e9d502837c156149109f4dd36b7bc12d6b3 (diff) | |
download | u-boot-imx-13287e3d47e40dd0b6cbcbae19fe705617fc42d9.zip u-boot-imx-13287e3d47e40dd0b6cbcbae19fe705617fc42d9.tar.gz u-boot-imx-13287e3d47e40dd0b6cbcbae19fe705617fc42d9.tar.bz2 |
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 <valentin.longchamp@keymile.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/lib/board.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index a101e03..34bbfca 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 |