Skip to contentSkip to conversation

fixup! of: implement new of_property_sprintf

PATCH Applied Ahmad Fatoum 2 participants 2 messages Jan 14, 2022 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fixup! of: implement new of_property_sprintf

Otherwise, tools like of_dump will consider the output to be byte arrays.

---
 drivers/of/base.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/of/base.c +2 -0
index 06e37b0fca4a..80465d6d5062 100644
@@ -2285,6 +2285,8 @@ int of_property_sprintf(struct device_node *np,
 	if (len < 0)
 		return -ENOMEM;
 
+	len++; /* trailing NUL */
+
 	pp = of_find_property(np, propname, NULL);
 	of_delete_property(pp);
 
Signature · 7 lines
2.33.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 7 lines · Ahmad Fatoum

Otherwise, tools like of_dump will consider the output to be byte arrays.

---
 drivers/of/base.c | 2 ++
 1 file changed, 2 insertions(+)

Applied, thanks.

I've rewritten the commit message as it's too late for a fixup.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox