[PATCH] checks: Do not check overlays for alias paths
Andrew Davis <[email protected]> Fri, 22 Aug 2025 12:10:38 -0500
| Newsgroups | org.kernel.vger.devicetree-compiler |
|---|---|
| Message-ID | <[email protected]> |
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. Signed-off-by: Andrew Davis <[email protected]> --- checks.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/checks.c b/checks.c index 2072e1e..5d09216 100644 --- a/checks.c +++ b/checks.c @@ -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 '-'"); } -- 2.39.2