[Crosstoolchain-logs] [device-tree-compiler] 25/58: checks: Add Warning for stricter node name character checking

Vagrant Cascadian vagrant at moszumanska.debian.org
Mon Sep 25 16:23:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

vagrant pushed a commit to branch debian/master
in repository device-tree-compiler.

commit 852e9ecbe1976927057402f8a8f71ee8e8a49098
Author: Rob Herring <robh at kernel.org>
Date:   Fri Feb 10 10:47:15 2017 -0600

    checks: Add Warning for stricter node name character checking
    
    While '#', '?', '.', '+', '*', and '_' are considered valid characters,
    their use is discouraged in recommended practices.
    
    Testing this found a few cases of '.'. The majority of the warnings were
    all from underscores.
    
    Signed-off-by: Rob Herring <robh at kernel.org>
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 checks.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/checks.c b/checks.c
index 22ef474..67237ff 100644
--- a/checks.c
+++ b/checks.c
@@ -252,6 +252,17 @@ static void check_node_name_chars(struct check *c, struct dt_info *dti,
 }
 ERROR(node_name_chars, check_node_name_chars, PROPNODECHARS "@");
 
+static void check_node_name_chars_strict(struct check *c, struct dt_info *dti,
+					 struct node *node)
+{
+	int n = strspn(node->name, c->data);
+
+	if (n < node->basenamelen)
+		FAIL(c, "Character '%c' not recommended in node %s",
+		     node->name[n], node->fullpath);
+}
+CHECK(node_name_chars_strict, check_node_name_chars_strict, PROPNODECHARSSTRICT);
+
 static void check_node_name_format(struct check *c, struct dt_info *dti,
 				   struct node *node)
 {
@@ -737,6 +748,7 @@ static struct check *check_table[] = {
 	&device_type_is_string, &model_is_string, &status_is_string,
 
 	&property_name_chars_strict,
+	&node_name_chars_strict,
 
 	&addr_size_cells, &reg_format, &ranges_format,
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list