From: Simon Glass <[email protected]> Add a way to remove this check and the reordering code, which is unnecessary if the dtb is known to be correctly ordered.
Signed-off-by: Simon Glass <[email protected]> Reviewed-by: David Gibson <[email protected]> Message-Id: <[email protected]> Signed-off-by: David Gibson <[email protected]> --- cpukit/dtc/libfdt/fdt_rw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpukit/dtc/libfdt/fdt_rw.c b/cpukit/dtc/libfdt/fdt_rw.c index fe13671eb6..13854253ff 100644 --- a/cpukit/dtc/libfdt/fdt_rw.c +++ b/cpukit/dtc/libfdt/fdt_rw.c @@ -435,7 +435,8 @@ int fdt_open_into(const void *fdt, void *buf, int bufsize) return struct_size; } - if (!fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) { + if (can_assume(LIBFDT_ORDER) | + !fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) { /* no further work necessary */ err = fdt_move(fdt, buf, bufsize); if (err) -- 2.16.4 _______________________________________________ devel mailing list [email protected] http://lists.rtems.org/mailman/listinfo/devel
