summaryrefslogtreecommitdiff
path: root/lib/fdtdec.c
diff options
context:
space:
mode:
authorBin Meng <bin.meng@windriver.com>2021-01-31 15:36:03 +0300
committerSimon Glass <sjg@chromium.org>2021-02-03 13:38:41 +0300
commitd17e9d2558ecbc2d6486555e6717396356b1f4e1 (patch)
tree97a07b537783110b9384aac7571ff0af7cf7e854 /lib/fdtdec.c
parent673625c45938dc9616e5cdb64bbd6459fd74fb00 (diff)
downloadu-boot-d17e9d2558ecbc2d6486555e6717396356b1f4e1.tar.xz
fdtdec: Cast prior_stage_fdt_address with uintptr_t
At present prior_stage_fdt_address is declared as phys_addr_t. On a 32-bit platform where phys_addr_t can be 64-bit, assigning its value to gd->fdt_blob which is a pointer, can cause warnings. Cast it to uintptr_t before the assignment. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/fdtdec.c')
-rw-r--r--lib/fdtdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index a2d2fb4e1f..e048f7777d 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1572,7 +1572,7 @@ int fdtdec_setup(void)
return -1;
}
# elif defined(CONFIG_OF_PRIOR_STAGE)
- gd->fdt_blob = (void *)prior_stage_fdt_address;
+ gd->fdt_blob = (void *)(uintptr_t)prior_stage_fdt_address;
# endif
# ifndef CONFIG_SPL_BUILD
/* Allow the early environment to override the fdt address */