* [PATCH] checks: Do not check overlays for alias paths
@ 2025-08-22 17:10 Andrew Davis
2025-08-25 1:56 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Davis @ 2025-08-22 17:10 UTC (permalink / raw)
To: David Gibson, Rob Herring, Saravana Kannan
Cc: devicetree-compiler, 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.
Signed-off-by: Andrew Davis <afd@ti.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] checks: Do not check overlays for alias paths
2025-08-22 17:10 [PATCH] checks: Do not check overlays for alias paths Andrew Davis
@ 2025-08-25 1:56 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2025-08-25 1:56 UTC (permalink / raw)
To: Andrew Davis; +Cc: Rob Herring, Saravana Kannan, devicetree-compiler
[-- Attachment #1: Type: text/plain, Size: 647 bytes --]
On Fri, Aug 22, 2025 at 12:10:38PM -0500, Andrew Davis wrote:
> 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 <afd@ti.com>
Applied, thanks. If you have a chance, adding a testcase for this
would be nice.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-25 1:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22 17:10 [PATCH] checks: Do not check overlays for alias paths Andrew Davis
2025-08-25 1:56 ` David Gibson
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).