lkml.org 
[lkml]   [2022]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] scripts: dtc: fix a false alarm for node_name_chars_strict
Date
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 <qun-wei.lin@mediatek.com>
---
scripts/dtc/checks.c | 5 +++++
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 */
+ return;
+ }
+
if (n < node->basenamelen)
FAIL(c, dti, node, "Character '%c' not recommended in node name",
node->name[n]);
--
2.18.0
\
 
 \ /
  Last update: 2022-05-31 07:35    [W:0.075 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site