aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2017-05-16 12:08:08 -0400
committerRob Herring <robh@kernel.org>2017-05-17 12:12:32 -0400
commit828d4cdd012c8ffbf76625c3ff164312e8666784 (patch)
tree71e194ec6c46ba79f11dfd4ba4c53f39aeeaacf9
parentdf3ed932394488e57e72dd0e73c224d1804fdc8f (diff)
dtc: check.c fix compile error
Fix the following compile error found on odroid-xu4: checks.c: In function ‘check_simple_bus_reg’: checks.c:876:41: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t{aka long long unsigned int}’ [-Werror=format=] snprintf(unit_addr, sizeof(unit_addr), "%lx", reg); ^ checks.c:876:41: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t {aka long long unsigned int}’ [-Werror=format=] cc1: all warnings being treated as errors Makefile:304: recipe for target 'checks.o' failed make: *** [checks.o] Error 1 Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> [dwg: Correct new format to be correct in general] Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [robh: cherry-picked from upstream dtc commit 2a42b14d0d03] Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r--scripts/dtc/checks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c
index 5adfc8f52b4f..4b72b530c84f 100644
--- a/scripts/dtc/checks.c
+++ b/scripts/dtc/checks.c
@@ -873,7 +873,7 @@ static void check_simple_bus_reg(struct check *c, struct dt_info *dti, struct no
873 while (size--) 873 while (size--)
874 reg = (reg << 32) | fdt32_to_cpu(*(cells++)); 874 reg = (reg << 32) | fdt32_to_cpu(*(cells++));
875 875
876 snprintf(unit_addr, sizeof(unit_addr), "%lx", reg); 876 snprintf(unit_addr, sizeof(unit_addr), "%zx", reg);
877 if (!streq(unitname, unit_addr)) 877 if (!streq(unitname, unit_addr))
878 FAIL(c, dti, "Node %s simple-bus unit address format error, expected \"%s\"", 878 FAIL(c, dti, "Node %s simple-bus unit address format error, expected \"%s\"",
879 node->fullpath, unit_addr); 879 node->fullpath, unit_addr);