[RFC PATCH 52/77] checks: Perform checks for orphan nodes

Herve Codina posted 77 patches 3 weeks, 5 days ago
[RFC PATCH 52/77] checks: Perform checks for orphan nodes
Posted by Herve Codina 3 weeks, 5 days ago
Orphan nodes have been introduced recently.

Those nodes and related trees need to be handled by the check process.

Indeed, in addition to performing checks, phandles are allocated and
referenced nodes are marked 'referenced' during the check process.

Take into account orphan nodes in check process.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 checks.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/checks.c b/checks.c
index 0a855f9..3ed3a0c 100644
--- a/checks.c
+++ b/checks.c
@@ -155,6 +155,7 @@ static bool is_multiple_of(int multiple, int divisor)
 static bool run_check(struct check *c, struct dt_info *dti)
 {
 	struct node *dt = dti->dt;
+	struct node *orphan;
 	bool error = false;
 	int i;
 
@@ -180,6 +181,9 @@ static bool run_check(struct check *c, struct dt_info *dti)
 
 	check_nodes_props(c, dti, dt);
 
+	for_each_orphan(dti->orphanlist, orphan)
+		check_nodes_props(c, dti, orphan);
+
 	if (c->status == UNCHECKED)
 		c->status = PASSED;
 
-- 
2.52.0