From: Grant Likely <grant.likely@linaro.org>
To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: Grant Likely <grant.likely@linaro.org>,
Gaurav Minocha <gaurav.minocha.os@gmail.com>,
Rob Herring <robh@kernel.org>
Subject: [PATCH] of/unittest: Remove obsolete code
Date: Thu, 22 Jan 2015 17:10:10 +0000 [thread overview]
Message-ID: <1421946610-6609-1-git-send-email-grant.likely@linaro.org> (raw)
Commit 3ce04b4a9, "Removes OF_UNITTEST dependency on OF_DYNAMIC config
symbol" removes a bunch of code, but missed a few minor bits. Clean it
up by removing the node removal cache and flag.
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
Cc: Rob Herring <robh@kernel.org>
---
drivers/of/unittest.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 139363af5c88..7aa1d6dae5ba 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -27,11 +27,6 @@ static struct selftest_results {
int failed;
} selftest_results;
-#define NO_OF_NODES 3
-static struct device_node *nodes[NO_OF_NODES];
-static int last_node_index;
-static bool selftest_live_tree;
-
#define selftest(result, fmt, ...) ({ \
bool failed = !(result); \
if (failed) { \
@@ -830,13 +825,6 @@ static int attach_node_and_children(struct device_node *np)
return 0;
}
- /* Children of the root need to be remembered for removal */
- if (np->parent == of_root) {
- if (WARN_ON(last_node_index >= NO_OF_NODES))
- return -EINVAL;
- nodes[last_node_index++] = np;
- }
-
child = np->child;
np->child = NULL;
@@ -899,10 +887,7 @@ static int __init selftest_data_add(void)
}
if (!of_root) {
- /* enabling flag for removing nodes */
- selftest_live_tree = true;
of_root = selftest_data_node;
-
for_each_of_allnodes(np)
__of_attach_node_sysfs(np);
of_aliases = of_find_node_by_path("/aliases");
--
2.1.0
next reply other threads:[~2015-01-22 17:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 17:10 Grant Likely [this message]
2015-02-04 3:24 ` [PATCH] of/unittest: Remove obsolete code Rob Herring
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=1421946610-6609-1-git-send-email-grant.likely@linaro.org \
--to=grant.likely@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=gaurav.minocha.os@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.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).