]> git.sur5r.net Git - u-boot/commitdiff
fdt: Correct cast for sandbox in fdtdec_setup_memory_size()
authorSimon Glass <sjg@chromium.org>
Sat, 27 May 2017 13:38:13 +0000 (07:38 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 2 Jun 2017 16:16:46 +0000 (10:16 -0600)
This gives a warning with some native compilers:

lib/fdtdec.c:1203:8: warning: format ‘%llx’ expects argument of type
   ‘long long unsigned int’, but argument 3 has type
   ‘long unsigned int’ [-Wformat=]

Fix it with a cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
lib/fdtdec.c

index 5a5645a0bf74b4fb66f10a0e90b41719a4778a17..91503b8cb922010829e0679544929f66a937213b 100644 (file)
@@ -1169,7 +1169,8 @@ int fdtdec_setup_memory_size(void)
        }
 
        gd->ram_size = (phys_size_t)(res.end - res.start + 1);
-       debug("%s: Initial DRAM size %llx\n", __func__, (u64)gd->ram_size);
+       debug("%s: Initial DRAM size %llx\n", __func__,
+             (unsigned long long)gd->ram_size);
 
        return 0;
 }