Commit fca8ba4e authored by Grant Likely's avatar Grant Likely

of/unittest: Remove obsolete code

Commit 3ce04b4a, "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: default avatarGrant Likely <grant.likely@linaro.org>
Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
Cc: Rob Herring <robh@kernel.org>
parent e94fbe60
...@@ -27,11 +27,6 @@ static struct selftest_results { ...@@ -27,11 +27,6 @@ static struct selftest_results {
int failed; int failed;
} selftest_results; } 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, ...) ({ \ #define selftest(result, fmt, ...) ({ \
bool failed = !(result); \ bool failed = !(result); \
if (failed) { \ if (failed) { \
...@@ -830,13 +825,6 @@ static int attach_node_and_children(struct device_node *np) ...@@ -830,13 +825,6 @@ static int attach_node_and_children(struct device_node *np)
return 0; 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; child = np->child;
np->child = NULL; np->child = NULL;
...@@ -899,10 +887,7 @@ static int __init selftest_data_add(void) ...@@ -899,10 +887,7 @@ static int __init selftest_data_add(void)
} }
if (!of_root) { if (!of_root) {
/* enabling flag for removing nodes */
selftest_live_tree = true;
of_root = selftest_data_node; of_root = selftest_data_node;
for_each_of_allnodes(np) for_each_of_allnodes(np)
__of_attach_node_sysfs(np); __of_attach_node_sysfs(np);
of_aliases = of_find_node_by_path("/aliases"); of_aliases = of_find_node_by_path("/aliases");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment