libfdt: Correct condition for reordering blocks
PATCH 1/1 libfdt: Correct condition for reordering blocks
This condition uses bitwise OR but should be logical OR. Fix it.
Signed-off-by Simon Glass <[email protected]>
Reported-by kernel test robot <[email protected]>
---
libfdt/fdt_rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libfdt/fdt_rw.c +1 -1
@@ -436,7 +436,7 @@ int fdt_open_into(const void *fdt, void *buf, int bufsize)return struct_size; } -if (can_assume (LIBFDT_ORDER ) | +if (can_assume (LIBFDT_ORDER ) || !fdt_blocks_misordered_ (fdt, mem_rsv_size, struct_size)) {/* no further work necessary */ err =fdt_move (fdt, buf, bufsize);
Signature · 1 line
2.27.0.290.gba653c62da-goog
A message that is not in the archive (sent off-list or not yet received): 20200615160033.87328-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
David Gibson
AppliedQuoted 4 lines · Simon Glass
This condition uses bitwise OR but should be logical OR. Fix it.
Signed-off-by Simon Glass <[email protected]>Reported-by kernel test robot <[email protected]>
Applied, thanks.
Quoted 18 lines
---
libfdt/fdt_rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libfdt/fdt_rw.c +1
-1@@ -436,7 +436,7 @@ int fdt_open_into(const void *fdt, void *buf, int bufsize)return struct_size; } -if (can_assume (LIBFDT_ORDER ) | +if (can_assume (LIBFDT_ORDER ) || !fdt_blocks_misordered_ (fdt, mem_rsv_size, struct_size)) {/* no further work necessary */ err =fdt_move (fdt, buf, bufsize);
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson