From: Bin Meng Date: Mon, 7 Dec 2015 09:39:47 +0000 (-0800) Subject: fdt: Change OF_BAD_ADDR to FDT_ADDR_T_NONE X-Git-Tag: v2016.01-rc3~46 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a0ae380b3c32254a6462674cfbfdd763d10bca41;p=u-boot fdt: Change OF_BAD_ADDR to FDT_ADDR_T_NONE Currently OF_BAD_ADDR is always -1ULL. When using OF_BAD_ADDR as the return value of dev_get_addr(), it creates potential size mismatch as dev_get_addr() uses FDT_ADDR_T_NONE as the return value which can be either -1U or -1ULL depending on CONFIG_PHYS_64BIT. Now we change OF_BAD_ADDR to FDT_ADDR_T_NONE to avoid such case. Signed-off-by: Bin Meng Acked-by: Simon Glass Reviewed-by: Stefan Roese --- diff --git a/common/fdt_support.c b/common/fdt_support.c index a7ff2dfb81..66464dbfd8 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -16,6 +16,7 @@ #include #include #include +#include /** * fdt_getprop_u32_default_node - Return a node's property or a default @@ -950,7 +951,7 @@ void fdt_del_node_and_alias(void *blob, const char *alias) /* Max address size we deal with */ #define OF_MAX_ADDR_CELLS 4 -#define OF_BAD_ADDR ((u64)-1) +#define OF_BAD_ADDR FDT_ADDR_T_NONE #define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \ (ns) > 0)