diff mbox series

[1/2] fdtdec: Fix the types of addr and size in fdtdec_add_reserved_memory()

Message ID 1589956713-5175-1-git-send-email-bmeng.cn@gmail.com
State New
Headers show
Series [1/2] fdtdec: Fix the types of addr and size in fdtdec_add_reserved_memory() | expand

Commit Message

Bin Meng May 20, 2020, 6:38 a.m. UTC
From: Bin Meng <bin.meng at windriver.com>

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 at windriver.com>
---

 lib/fdtdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Simon Glass May 20, 2020, 2:20 p.m. UTC | #1
On Wed, 20 May 2020 at 00:38, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> From: Bin Meng <bin.meng at windriver.com>
>
> 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 at windriver.com>
> ---
>
>  lib/fdtdec.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>
diff mbox series

Patch

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 9c4d571..2d8ef65 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) {