On Wed, Feb 10, 2021 at 01:39:12PM -0600, Kumar Gala wrote: > Treat a node-name and property name at the same level of tree as > a warning Applied, thanks. > > Signed-off-by: Kumar Gala > --- > checks.c | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/checks.c b/checks.c > index 48e7fe9..c420772 100644 > --- a/checks.c > +++ b/checks.c > @@ -331,6 +331,20 @@ static void check_node_name_format(struct check *c, struct dt_info *dti, > } > ERROR(node_name_format, check_node_name_format, NULL, &node_name_chars); > > +static void check_node_name_vs_property_name(struct check *c, > + struct dt_info *dti, > + struct node *node) > +{ > + if (!node->parent) > + return; > + > + if (get_property(node->parent, node->name)) { > + FAIL(c, dti, node, "node name and property name conflict"); > + } > +} > +WARNING(node_name_vs_property_name, check_node_name_vs_property_name, > + NULL, &node_name_chars); > + > static void check_unit_address_vs_reg(struct check *c, struct dt_info *dti, > struct node *node) > { > @@ -1797,7 +1811,7 @@ WARNING(graph_endpoint, check_graph_endpoint, NULL, &graph_nodes); > static struct check *check_table[] = { > &duplicate_node_names, &duplicate_property_names, > &node_name_chars, &node_name_format, &property_name_chars, > - &name_is_string, &name_properties, > + &name_is_string, &name_properties, &node_name_vs_property_name, > > &duplicate_label, > -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson