Thread (8 messages) 8 messages, 4 authors, 2022-06-02

Re: [PATCH] scripts: dtc: fix a false alarm for node_name_chars_strict

From: Rob Herring <robh+dt@kernel.org>
Date: 2022-05-31 13:06:50
Also in: linux-devicetree, linux-mediatek, lkml

On Tue, May 31, 2022 at 12:34 AM Qun-Wei Lin [off-list ref] wrote:
The function check_node_name_chars_strict issues a false alarm when
compiling an overlay dts.

/fragment@0/__overlay__: Character '_' not recommended in node name

This workaround will fix it by skip checking for node named __overlay__.

Signed-off-by: Qun-Wei Lin <redacted>
---
 scripts/dtc/checks.c | 5 +++++
We don't take patches for dtc. You must send them to upstream dtc and
then it will be sync'ed to the kernel tree.
quoted hunk ↗ jump to hunk
 1 file changed, 5 insertions(+)
diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c
index 781ba1129a8e..6ef4f2cd67b9 100644
--- a/scripts/dtc/checks.c
+++ b/scripts/dtc/checks.c
@@ -325,6 +325,11 @@ static void check_node_name_chars_strict(struct check *c, struct dt_info *dti,
 {
        int n = strspn(node->name, c->data);

+       if (streq(node->name, "__overlay__")) {
+               /* HACK: Overlay fragments are a special case */
Not a hack IMO.

However, this should be checking for any node name starting with '__'.

Also, doesn't 'fragment@0' cause a warning about missing 'reg'?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help