From: Keerthy Date: Fri, 21 Dec 2018 21:54:30 +0530 Subject: [U-Boot] [PATCH 1/2] lib: fdtdec: fdtdec_get_addr_size_fixed remove checks In-Reply-To: <1545409471-10036-1-git-send-email-j-keerthy@ti.com> References: <1545409471-10036-1-git-send-email-j-keerthy@ti.com> Message-ID: <1545409471-10036-2-git-send-email-j-keerthy@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de With 8 bytes addressing even on 32 bit machines these checks are no longer valid. Remove them. Signed-off-by: Keerthy --- lib/fdtdec.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 6f8ec0d..18663ce 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -95,16 +95,6 @@ fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node, debug("%s: %s: ", __func__, prop_name); - if (na > (sizeof(fdt_addr_t) / sizeof(fdt32_t))) { - debug("(na too large for fdt_addr_t type)\n"); - return FDT_ADDR_T_NONE; - } - - if (ns > (sizeof(fdt_size_t) / sizeof(fdt32_t))) { - debug("(ns too large for fdt_size_t type)\n"); - return FDT_ADDR_T_NONE; - } - prop = fdt_getprop(blob, node, prop_name, &len); if (!prop) { debug("(not found)\n"); -- 1.9.1