From: Sakari Ailus <sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1/1] devicetree: Document of_property_read_string_array() better
Date: Thu, 23 Feb 2017 23:40:19 +0200 [thread overview]
Message-ID: <1487886019-25869-1-git-send-email-sakari.ailus@linux.intel.com> (raw)
of_property_read_string_array() is documented to return the number of
strings present in a string array property if its target string buffer is
NULL. What is not documented, however, is that is returned if the buffer
is non-NULL. It returns the number of strings read. Document this.
Signed-off-by: Sakari Ailus <sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
include/linux/of.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/of.h b/include/linux/of.h
index d72f010..0579156 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -953,6 +953,7 @@ static inline int of_property_count_u64_elems(const struct device_node *np,
* terminated string values (pointer to data, not a copy) in that property.
*
* If @out_strs is NULL, the number of strings in the property is returned.
+ * Otherwise, returns the number of strings read.
*/
static inline int of_property_read_string_array(const struct device_node *np,
const char *propname, const char **out_strs,
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2017-02-23 21:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 21:40 Sakari Ailus [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-02-28 7:30 [PATCH 1/1] devicetree: Document of_property_read_string_array() better Sakari Ailus
[not found] ` <1488267006-29945-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-03-02 6:52 ` Frank Rowand
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=1487886019-25869-1-git-send-email-sakari.ailus@linux.intel.com \
--to=sakari.ailus-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).