From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH] fixup! of: implement new of_property_sprintf
Date: Wed, 15 Dec 2021 21:16:36 +0100 [thread overview]
Message-ID: <20211215201636.694706-1-ahmad@a3f.at> (raw)
In-Reply-To: <20211209105708.3517684-3-a.fatoum@pengutronix.de>
Otherwise, tools like of_dump will consider the output to be byte
arrays.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
drivers/of/base.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 06e37b0fca4a..80465d6d5062 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -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);
--
2.33.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-12-15 20:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 10:57 [PATCH 1/3] vsprintf: add support for printing raw buffers as hex (%*ph) Ahmad Fatoum
2021-12-09 10:57 ` [PATCH 2/3] common: add new PRINTF_FULL option Ahmad Fatoum
2021-12-09 10:57 ` [PATCH 3/3] of: implement new of_property_sprintf Ahmad Fatoum
2021-12-15 20:16 ` Ahmad Fatoum [this message]
2021-12-13 22:28 ` [PATCH 1/3] vsprintf: add support for printing raw buffers as hex (%*ph) Sascha Hauer
2021-12-14 6:57 ` Ahmad Fatoum
2021-12-14 7:27 ` Sascha Hauer
2022-01-03 10:40 ` Ahmad Fatoum
2022-01-14 8:57 [PATCH] fixup! of: implement new of_property_sprintf Ahmad Fatoum
2022-01-14 10:29 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211215201636.694706-1-ahmad@a3f.at \
--to=ahmad@a3f.at \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox