* [PATCH] libfdt: Correct condition for reordering blocks
@ 2020-06-15 16:00 Simon Glass
[not found] ` <20200615160033.87328-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Simon Glass @ 2020-06-15 16:00 UTC (permalink / raw)
To: Devicetree Compiler
Cc: David Gibson, Rob Herring, Simon Glass, kernel test robot
This condition uses bitwise OR but should be logical OR. Fix it.
Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Reported-by: kernel test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
libfdt/fdt_rw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libfdt/fdt_rw.c b/libfdt/fdt_rw.c
index 524b520..93e4a2b 100644
--- a/libfdt/fdt_rw.c
+++ b/libfdt/fdt_rw.c
@@ -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);
--
2.27.0.290.gba653c62da-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libfdt: Correct condition for reordering blocks
[not found] ` <20200615160033.87328-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
@ 2020-06-16 3:13 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2020-06-16 3:13 UTC (permalink / raw)
To: Simon Glass; +Cc: Devicetree Compiler, Rob Herring, kernel test robot
[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]
On Mon, Jun 15, 2020 at 10:00:33AM -0600, Simon Glass wrote:
> This condition uses bitwise OR but should be logical OR. Fix it.
>
> Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> Reported-by: kernel test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Applied, thanks.
> ---
>
> libfdt/fdt_rw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libfdt/fdt_rw.c b/libfdt/fdt_rw.c
> index 524b520..93e4a2b 100644
> --- a/libfdt/fdt_rw.c
> +++ b/libfdt/fdt_rw.c
> @@ -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);
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-16 3:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 16:00 [PATCH] libfdt: Correct condition for reordering blocks Simon Glass
[not found] ` <20200615160033.87328-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2020-06-16 3:13 ` David Gibson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.