[Crosstoolchain-logs] [device-tree-compiler] 21/29: checks: add aliases node checks
Vagrant Cascadian
vagrant at moszumanska.debian.org
Tue Jan 23 06:34:39 UTC 2018
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 e671852042a77b15ec72ca908291c7d647e4fb01
Author: Rob Herring <robh at kernel.org>
Date: Tue Dec 12 16:46:28 2017 -0600
checks: add aliases node checks
Add checks for aliases node that all properties follow alias naming
convention and the values are a valid path.
Signed-off-by: Rob Herring <robh at kernel.org>
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
checks.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/checks.c b/checks.c
index e0ec67b..66e5fd6 100644
--- a/checks.c
+++ b/checks.c
@@ -636,6 +636,28 @@ static void check_names_is_string_list(struct check *c, struct dt_info *dti,
}
WARNING(names_is_string_list, check_names_is_string_list, NULL);
+static void check_alias_paths(struct check *c, struct dt_info *dti,
+ struct node *node)
+{
+ struct property *prop;
+
+ if (!streq(node->name, "aliases"))
+ return;
+
+ for_each_property(node, prop) {
+ if (!prop->val.val || !get_node_by_path(dti->dt, prop->val.val)) {
+ FAIL(c, dti, "aliases property '%s' is not a valid node (%s)",
+ prop->name, prop->val.val);
+ continue;
+ }
+ if (strspn(prop->name, LOWERCASE DIGITS "-") != strlen(prop->name))
+ FAIL(c, dti, "aliases property name '%s' is not valid",
+ prop->name);
+
+ }
+}
+WARNING(alias_paths, check_alias_paths, NULL);
+
static void fixup_addr_size_cells(struct check *c, struct dt_info *dti,
struct node *node)
{
@@ -1354,6 +1376,8 @@ static struct check *check_table[] = {
&gpios_property,
&interrupts_property,
+ &alias_paths,
+
&always_fail,
};
--
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