On Thu, Dec 14, 2017 at 8:27 PM, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote: > On Thu, Dec 14, 2017 at 04:40:01PM -0600, Rob Herring wrote: >> Add some checks for /chosen node. These check that chosen is located at >> the root level and that bootargs and stdout-path properties are strings. >> >> Signed-off-by: Rob Herring <robh@xxxxxxxxxx> > > Applied, thanks. > > One possible follow-on... > > [snip] >> +static void check_chosen_node_stdout_path(struct check *c, struct dt_info *dti, >> + struct node *node) >> +{ >> + struct property *prop; >> + >> + if (!streq(node->name, "chosen")) >> + return; >> + >> + prop = get_property(node, "stdout-path"); >> + if (!prop) { >> + prop = get_property(node, "linux,stdout-path"); >> + if (!prop) >> + return; >> + FAIL(c, dti, "Use 'stdout-path' instead of 'linux,stdout-path'"); >> + } >> + >> + c->data = prop->name; >> + check_is_string(c, dti, node); > > .. you could also check that it's actually a valid path to a node, > couldn't you? Yes I thought of that, but it's often an alias. I didn't look closely, but I don't think that would work unless I add that additional lookup. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html