@@ -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, ®_format, &ranges_format,
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@kernel.org> --- v2: - Disable check by default checks.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.10.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html