From: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
To: u-boot@lists.denx.de
Subject: [PATCH] Revert "dm: fdt: scan for devices under /firmware too"
Date: Mon, 17 Feb 2020 12:35:45 -0800 [thread overview]
Message-ID: <20200217203545.26470-1-thiruan@linux.microsoft.com> (raw)
Subnodes under "/firmware" node are scanned twice in
dm_scan_fdt_node() and dm_extended_scan_fdt().
This patch removes the scanning in dm_scan_fdt_node() to
avoid double scanning.
This reverts commit 747558d014577526bf2e8d9fe9ca748fdbf75d8a.
Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
---
drivers/core/root.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/core/root.c b/drivers/core/root.c
index e85643819e..cb695e933a 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -254,15 +254,9 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
for (offset = fdt_first_subnode(blob, offset);
offset > 0;
offset = fdt_next_subnode(blob, offset)) {
- const char *node_name = fdt_get_name(blob, offset, NULL);
-
- /*
- * The "chosen" and "firmware" nodes aren't devices
- * themselves but may contain some:
- */
- if (!strcmp(node_name, "chosen") ||
- !strcmp(node_name, "firmware")) {
- pr_debug("parsing subnodes of \"%s\"\n", node_name);
+ /* "chosen" node isn't a device itself but may contain some: */
+ if (!strcmp(fdt_get_name(blob, offset, NULL), "chosen")) {
+ pr_debug("parsing subnodes of \"chosen\"\n");
err = dm_scan_fdt_node(parent, blob, offset,
pre_reloc_only);
@@ -279,7 +273,8 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
pre_reloc_only);
if (err && !ret) {
ret = err;
- debug("%s: ret=%d\n", node_name, ret);
+ debug("%s: ret=%d\n", fdt_get_name(blob, offset, NULL),
+ ret);
}
}
--
2.24.1
next reply other threads:[~2020-02-17 20:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 20:35 Thirupathaiah Annapureddy [this message]
2020-02-18 7:22 ` [PATCH] Revert "dm: fdt: scan for devices under /firmware too" Michal Simek
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=20200217203545.26470-1-thiruan@linux.microsoft.com \
--to=thiruan@linux.microsoft.com \
--cc=u-boot@lists.denx.de \
/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