From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Thu, 21 Jan 2021 23:00:12 +0800 Subject: [PATCH 4/7] fdtdec: Cast prior_stage_fdt_address with uintptr_t In-Reply-To: <20210121150015.25558-1-bmeng.cn@gmail.com> References: <20210121150015.25558-1-bmeng.cn@gmail.com> Message-ID: <20210121150015.25558-5-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Bin Meng 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 --- lib/fdtdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 0ab7105fef..4abc7e00fd 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1571,7 +1571,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 */ -- 2.25.1