summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Meng <bin.meng@windriver.com>2020-05-19 23:38:32 -0700
committerSimon Glass <sjg@chromium.org>2020-06-11 20:52:11 -0600
commita9ad113df005b4ecd7b719736c228b1da69aa8d6 (patch)
tree655c9f620befea86ea5ff72e1ad0dfdd15f96674
parent7664b03ffc51fa7563969c61fa28bf656af441bd (diff)
downloadu-boot-a9ad113df005b4ecd7b719736c228b1da69aa8d6.tar.gz
u-boot-a9ad113df005b4ecd7b719736c228b1da69aa8d6.tar.xz
u-boot-a9ad113df005b4ecd7b719736c228b1da69aa8d6.zip
fdtdec: Fix the types of addr and size in fdtdec_add_reserved_memory()
fdtdec_get_addr_size() expects size is of type 'fdt_size_t', and return value is of type 'fdt_addr_t'. Adjust their types accordingly. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--lib/fdtdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 1f2b763acc..42f7a25505 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1294,7 +1294,8 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename,
/* find a matching node and return the phandle to that */
fdt_for_each_subnode(node, blob, parent) {
const char *name = fdt_get_name(blob, node, NULL);
- phys_addr_t addr, size;
+ fdt_addr_t addr;
+ fdt_size_t size;
addr = fdtdec_get_addr_size(blob, node, "reg", &size);
if (addr == FDT_ADDR_T_NONE) {