]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common/board_r: remove warning in initr_mem for 64-bit phys_size_t
authorValentin Longchamp <valentin.longchamp@keymile.com>
Fri, 3 Oct 2014 09:16:19 +0000 (11:16 +0200)
committerTom Rini <trini@ti.com>
Fri, 10 Oct 2014 13:44:45 +0000 (09:44 -0400)
Since on powerpc phys_size_t can be unsigned long long, this printout
line can result in a not nice compile warning.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-by: Simon Glass <sjg@chromium.org>
common/board_r.c

index c339aad7f58a8a58d16309cfe780268aa78c9f36..7e1a76d97f73be5d2eb3d347dffbb82d301b7522 100644 (file)
@@ -664,7 +664,7 @@ int initr_mem(void)
        /* Also take the logbuffer into account (pram is in kB) */
        pram += (LOGBUFF_LEN + LOGBUFF_OVERHEAD) / 1024;
 # endif
-       sprintf(memsz, "%ldk", (gd->ram_size / 1024) - pram);
+       sprintf(memsz, "%ldk", (long int) ((gd->ram_size / 1024) - pram));
        setenv("mem", memsz);
 
        return 0;