Skip to contentSkip to conversation

libfdt: fix "Bring in upstream stringlist functions"

PATCH New Masahiro Yamada 2 participants 5 messages Oct 17, 2016 – Oct 24, 2016

lore
Share & tools
lore
#0 lore raw

v2 cover libfdt: fix "Bring in upstream stringlist functions"

I found my boards are broken since

commit b02e4044ff8ee1f6ac83917a39514172a9b449fb

Author: Simon Glass <[email protected]>
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.

The upstream libfdt has been fixed,
so I am backporting commits.

Changes in v2:
- Add sob of David Gibson

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(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/2 libfdt: fix fdt_stringlist_count()

If fdt_getprop() fails, negative error code should be returned.

[ DTC commit: e28eff5b787adb3f461d1653598818b2f1f25a73 ]

---

 lib/libfdt/fdt_ro.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/libfdt/fdt_ro.c +1 -1
index 7e894b7..fc08981 100644
@@ -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;
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 1/2 libfdt: fix fdt_stringlist_count()

Quoted 6 lines · Masahiro Yamada

If fdt_getprop() fails, negative error code should be returned.

[ DTC commit: e28eff5b787adb3f461d1653598818b2f1f25a73 ]

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/8fcc398f/attachment.sig>
#3 lore raw

PATCH v2 2/2 libfdt: fix fdt_stringlist_search()

In reply to Masahiro Yamada

If fdt_getprop() fails, negative error code should be returned.

[ DTC commit: daa75e8fa5942caa8e97931aed3a1ee0b7edd74b ]

---

 lib/libfdt/fdt_ro.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/libfdt/fdt_ro.c +1 -1
index fc08981..1be9538 100644
@@ -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;
Signature · 1 line
1.9.1
#4 lore raw

PATCH v2 2/2 libfdt: fix fdt_stringlist_search()

Quoted 6 lines · Masahiro Yamada

If fdt_getprop() fails, negative error code should be returned.

[ DTC commit: daa75e8fa5942caa8e97931aed3a1ee0b7edd74b ]

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/fce00550/attachment.sig>