* [U-Boot] [PATCH 0/2] libfdt: fix "Bring in upstream stringlist functions"
@ 2016-10-17 6:24 Masahiro Yamada
2016-10-17 6:24 ` [U-Boot] [PATCH 1/2] libfdt: fix fdt_stringlist_count() Masahiro Yamada
2016-10-17 6:24 ` [U-Boot] [PATCH 2/2] libfdt: fix fdt_stringlist_search() Masahiro Yamada
0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2016-10-17 6:24 UTC (permalink / raw)
To: u-boot
I found my boards are broken since
commit b02e4044ff8ee1f6ac83917a39514172a9b449fb
Author: Simon Glass <sjg@chromium.org>
Date: Sun Oct 2 17:59:28 2016 -0600
libfdt: Bring in upstream stringlist functions
I figured out that the root cause
is in the upstream libfdt.
I posted patches to the DTC ML,
and here is a counterpart for U-Boot.
Masahiro Yamada (2):
libfdt: fix fdt_stringlist_count()
libfdt: fix fdt_stringlist_search()
lib/libfdt/fdt_ro.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 1/2] libfdt: fix fdt_stringlist_count()
2016-10-17 6:24 [U-Boot] [PATCH 0/2] libfdt: fix "Bring in upstream stringlist functions" Masahiro Yamada
@ 2016-10-17 6:24 ` Masahiro Yamada
2016-10-17 22:17 ` Simon Glass
2016-10-17 6:24 ` [U-Boot] [PATCH 2/2] libfdt: fix fdt_stringlist_search() Masahiro Yamada
1 sibling, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2016-10-17 6:24 UTC (permalink / raw)
To: u-boot
If fdt_getprop() fails, negative error code should be returned.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
lib/libfdt/fdt_ro.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c
index 7e894b7..fc08981 100644
--- a/lib/libfdt/fdt_ro.c
+++ b/lib/libfdt/fdt_ro.c
@@ -550,7 +550,7 @@ int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property)
list = fdt_getprop(fdt, nodeoffset, property, &length);
if (!list)
- return -length;
+ return length;
end = list + length;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 2/2] libfdt: fix fdt_stringlist_search()
2016-10-17 6:24 [U-Boot] [PATCH 0/2] libfdt: fix "Bring in upstream stringlist functions" Masahiro Yamada
2016-10-17 6:24 ` [U-Boot] [PATCH 1/2] libfdt: fix fdt_stringlist_count() Masahiro Yamada
@ 2016-10-17 6:24 ` Masahiro Yamada
2016-10-17 22:17 ` Simon Glass
1 sibling, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2016-10-17 6:24 UTC (permalink / raw)
To: u-boot
If fdt_getprop() fails, negative error code should be returned.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
lib/libfdt/fdt_ro.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c
index fc08981..1be9538 100644
--- a/lib/libfdt/fdt_ro.c
+++ b/lib/libfdt/fdt_ro.c
@@ -576,7 +576,7 @@ int fdt_stringlist_search(const void *fdt, int nodeoffset, const char *property,
list = fdt_getprop(fdt, nodeoffset, property, &length);
if (!list)
- return -length;
+ return length;
len = strlen(string) + 1;
end = list + length;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 1/2] libfdt: fix fdt_stringlist_count()
2016-10-17 6:24 ` [U-Boot] [PATCH 1/2] libfdt: fix fdt_stringlist_count() Masahiro Yamada
@ 2016-10-17 22:17 ` Simon Glass
0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2016-10-17 22:17 UTC (permalink / raw)
To: u-boot
On 17 October 2016 at 00:24, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> If fdt_getprop() fails, negative error code should be returned.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> lib/libfdt/fdt_ro.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 2/2] libfdt: fix fdt_stringlist_search()
2016-10-17 6:24 ` [U-Boot] [PATCH 2/2] libfdt: fix fdt_stringlist_search() Masahiro Yamada
@ 2016-10-17 22:17 ` Simon Glass
0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2016-10-17 22:17 UTC (permalink / raw)
To: u-boot
On 17 October 2016 at 00:24, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> If fdt_getprop() fails, negative error code should be returned.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> lib/libfdt/fdt_ro.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-17 22:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 6:24 [U-Boot] [PATCH 0/2] libfdt: fix "Bring in upstream stringlist functions" Masahiro Yamada
2016-10-17 6:24 ` [U-Boot] [PATCH 1/2] libfdt: fix fdt_stringlist_count() Masahiro Yamada
2016-10-17 22:17 ` Simon Glass
2016-10-17 6:24 ` [U-Boot] [PATCH 2/2] libfdt: fix fdt_stringlist_search() Masahiro Yamada
2016-10-17 22:17 ` Simon Glass
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.