diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fdtdec.c | 4 | ||||
-rw-r--r-- | lib/libfdt/fdt_ro.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 9877849f99..9c6b3619da 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -102,8 +102,8 @@ fdt_addr_t fdtdec_get_addr_size(const void *blob, int node, size = (fdt_size_t *)((char *)cell + sizeof(fdt_addr_t)); *sizep = fdt_size_to_cpu(*size); - debug("addr=%08lx, size=%08x\n", - (ulong)addr, *sizep); + debug("addr=%08lx, size=%llx\n", + (ulong)addr, (u64)*sizep); } else { debug("%08lx\n", (ulong)addr); } diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c index 44fc0aa900..7b0777b67e 100644 --- a/lib/libfdt/fdt_ro.c +++ b/lib/libfdt/fdt_ro.c @@ -517,7 +517,7 @@ int fdt_count_strings(const void *fdt, int node, const char *property) list = fdt_getprop(fdt, node, property, &length); if (!list) - return -length; + return length; for (i = 0; i < length; i++) { int len = strlen(list); @@ -577,7 +577,7 @@ int fdt_get_string_index(const void *fdt, int node, const char *property, index--; } - return FDT_ERR_NOTFOUND; + return -FDT_ERR_NOTFOUND; } int fdt_get_string(const void *fdt, int node, const char *property, |