Skip to contentSkip to conversation

checks: Do not check overlays for alias paths

PATCH In review Andrew Davis 2 participants 2 messages Aug 22, 2025 – Aug 25, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checks: Do not check overlays for alias paths

The path given as an alias inside an overlay can be a path to a node in the base DT. The path check searches only the overlay as that is the only tree available leading to false check failures.

Skip this check when checking an overlay.

---
 checks.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
checks.c +4 -1
index 2072e1e..5d09216 100644
@@ -718,11 +718,14 @@ static void check_alias_paths(struct check *c, struct dt_info *dti,
 			continue;
 		}
 
-		if (!prop->val.val || !get_node_by_path(dti->dt, prop->val.val)) {
+		/* This check does not work for overlays with external paths */
+		if (!(dti->dtsflags & DTSF_PLUGIN) &&
+		    (!prop->val.val || !get_node_by_path(dti->dt, prop->val.val))) {
 			FAIL_PROP(c, dti, node, prop, "aliases property is not a valid node (%s)",
 				  prop->val.val);
 			continue;
 		}
+
 		if (strspn(prop->name, LOWERCASE DIGITS "-") != strlen(prop->name))
 			FAIL(c, dti, node, "aliases property name must include only lowercase and '-'");
 	}
Signature · 1 line
2.39.2
#1 lore raw
Quoted 7 lines · Andrew Davis

The path given as an alias inside an overlay can be a path to a node in the base DT. The path check searches only the overlay as that is the only tree available leading to false check failures.

Skip this check when checking an overlay.

Applied, thanks. If you have a chance, adding a testcase for this would be nice.

Signature · 4 lines
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson