mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/2] of: base: improve documentation of global exports
Date: Thu, 25 Nov 2021 17:06:37 +0100	[thread overview]
Message-ID: <20211125160637.3828394-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20211125160637.3828394-1-a.fatoum@pengutronix.de>

Most comments are probably from the initial Linux port. Fix some
discrepancies and add docs for barebox-specific of_probe.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/of/base.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index ec4f9327036c..065265ec9756 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -171,8 +171,7 @@ static int of_alias_id_parse(const char *start, int *len)
  * of_alias_scan - Scan all properties of 'aliases' node
  *
  * The function scans all the properties of 'aliases' node and populates
- * the global lookup table with the properties.  It returns the
- * number of alias_prop found, or error code in error case.
+ * the global lookup table with the properties.
  */
 void of_alias_scan(void)
 {
@@ -2354,6 +2353,13 @@ static const struct of_device_id reserved_mem_matches[] = {
 	{}
 };
 
+/**
+ * of_probe - Probe unflattened device tree starting at of_get_root_node
+ *
+ * The function walks the device tree and creates devices as needed.
+ * With care, it can be called more than once, but if you really need that,
+ * consider first if deep probe would help instead.
+ */
 int of_probe(void)
 {
 	struct device_node *node;
@@ -2727,8 +2733,6 @@ struct device_node *of_find_node_by_reproducible_name(struct device_node *from,
  * of_graph_parse_endpoint() - parse common endpoint node properties
  * @node: pointer to endpoint device_node
  * @endpoint: pointer to the OF endpoint data structure
- *
- * The caller should hold a reference to @node.
  */
 int of_graph_parse_endpoint(const struct device_node *node,
 			    struct of_endpoint *endpoint)
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-11-25 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 16:06 [PATCH 1/2] of: skip machine device creation on subsequent of_probe Ahmad Fatoum
2021-11-25 16:06 ` Ahmad Fatoum [this message]
2021-11-30 10:36 ` 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=20211125160637.3828394-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --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