Skip to content
Snippets Groups Projects
Commit 13287e3d authored by Valentin Longchamp's avatar Valentin Longchamp Committed by York Sun
Browse files

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: default avatarValentin Longchamp <valentin.longchamp@keymile.com>
parent 77354e9d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment