summaryrefslogtreecommitdiff
path: root/scripts/dtc/libfdt/fdt_overlay.c
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2020-10-16 15:42:50 +0100
committerTom Rini <trini@konsulko.com>2020-11-10 14:31:08 -0500
commit832bfad7451e2e7bd23c96edff2be050905ac3f6 (patch)
tree2718e71690825af1f097bbbe38983d505ea9d92c /scripts/dtc/libfdt/fdt_overlay.c
parentf36603c7a823308f23d10d443d6cbf6b365c12bd (diff)
libfdt: Fix signedness comparison warnings
This is a combination of upstream libfdt commits to fix warnings about comparing signed and unsigned integers: ========== scripts/dtc/libfdt/fdt.c: In function ‘fdt_offset_ptr’: scripts/dtc/libfdt/fdt.c:137:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((absoffset < offset) ... ========== For a detailed description of the fixes, see the dtc repo: https://git.kernel.org/pub/scm/utils/dtc/dtc.git/log/?id=73e0f143b73d808 For this patch the commits between 73e0f143b73d8088 and ca19c3db2bf62000 have been combined and adjusted for the slight differences in U-Boot's libfdt code base. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'scripts/dtc/libfdt/fdt_overlay.c')
-rw-r--r--scripts/dtc/libfdt/fdt_overlay.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/dtc/libfdt/fdt_overlay.c b/scripts/dtc/libfdt/fdt_overlay.c
index bd75e3dd786..7a65c35af6f 100644
--- a/scripts/dtc/libfdt/fdt_overlay.c
+++ b/scripts/dtc/libfdt/fdt_overlay.c
@@ -241,6 +241,7 @@ static int overlay_update_local_node_references(void *fdto,
if (fixup_len % sizeof(uint32_t))
return -FDT_ERR_BADOVERLAY;
+ fixup_len /= sizeof(uint32_t);
tree_val = fdt_getprop(fdto, tree_node, name, &tree_len);
if (!tree_val) {
@@ -250,7 +251,7 @@ static int overlay_update_local_node_references(void *fdto,
return tree_len;
}
- for (i = 0; i < (fixup_len / sizeof(uint32_t)); i++) {
+ for (i = 0; i < fixup_len; i++) {
fdt32_t adj_val;
uint32_t poffset;