Lines Matching refs:node
43 typedef void (*check_fn)(struct check *c, struct dt_info *dti, struct node *node);
100 static void check_nodes_props(struct check *c, struct dt_info *dti, struct node *node) in check_nodes_props() argument
102 struct node *child; in check_nodes_props()
104 TRACE(c, "%s", node->fullpath); in check_nodes_props()
106 c->fn(c, dti, node); in check_nodes_props()
108 for_each_child(node, child) in check_nodes_props()
114 struct node *dt = dti->dt; in run_check()
158 struct node *node) in check_always_fail() argument
165 struct node *node) in check_is_string() argument
170 prop = get_property(node, propname); in check_is_string()
176 propname, node->fullpath); in check_is_string()
184 struct node *node) in check_is_cell() argument
189 prop = get_property(node, propname); in check_is_cell()
195 propname, node->fullpath); in check_is_cell()
207 struct node *node) in check_duplicate_node_names() argument
209 struct node *child, *child2; in check_duplicate_node_names()
211 for_each_child(node, child) in check_duplicate_node_names()
222 struct node *node) in check_duplicate_property_names() argument
226 for_each_property(node, prop) { in check_duplicate_property_names()
232 prop->name, node->fullpath); in check_duplicate_property_names()
244 struct node *node) in check_node_name_chars() argument
246 int n = strspn(node->name, c->data); in check_node_name_chars()
248 if (n < strlen(node->name)) in check_node_name_chars()
250 node->name[n], node->fullpath); in check_node_name_chars()
255 struct node *node) in check_node_name_format() argument
257 if (strchr(get_unitname(node), '@')) in check_node_name_format()
259 node->fullpath); in check_node_name_format()
264 struct node *node) in check_unit_address_vs_reg() argument
266 const char *unitname = get_unitname(node); in check_unit_address_vs_reg()
267 struct property *prop = get_property(node, "reg"); in check_unit_address_vs_reg()
270 prop = get_property(node, "ranges"); in check_unit_address_vs_reg()
278 node->fullpath); in check_unit_address_vs_reg()
282 node->fullpath); in check_unit_address_vs_reg()
288 struct node *node) in check_property_name_chars() argument
292 for_each_property(node, prop) { in check_property_name_chars()
297 prop->name[n], prop->name, node->fullpath); in check_property_name_chars()
303 #define DESCLABEL_ARGS(node,prop,mark) \ argument
307 ((prop) ? "' in " : ""), (node)->fullpath
310 const char *label, struct node *node, in check_duplicate_label() argument
313 struct node *dt = dti->dt; in check_duplicate_label()
314 struct node *othernode = NULL; in check_duplicate_label()
329 if ((othernode != node) || (otherprop != prop) || (othermark != mark)) in check_duplicate_label()
332 label, DESCLABEL_ARGS(node, prop, mark), in check_duplicate_label()
337 struct node *node) in check_duplicate_label_node() argument
342 for_each_label(node->labels, l) in check_duplicate_label_node()
343 check_duplicate_label(c, dti, l->label, node, NULL, NULL); in check_duplicate_label_node()
345 for_each_property(node, prop) { in check_duplicate_label_node()
349 check_duplicate_label(c, dti, l->label, node, prop, NULL); in check_duplicate_label_node()
352 check_duplicate_label(c, dti, m->ref, node, prop, m); in check_duplicate_label_node()
358 struct node *node, const char *propname) in check_phandle_prop() argument
360 struct node *root = dti->dt; in check_phandle_prop()
365 prop = get_property(node, propname); in check_phandle_prop()
371 node->fullpath, prop->val.len, prop->name); in check_phandle_prop()
378 if (node != get_node_by_ref(root, m->ref)) in check_phandle_prop()
383 prop->name, node->fullpath); in check_phandle_prop()
397 node->fullpath, phandle, prop->name); in check_phandle_prop()
405 struct node *node) in check_explicit_phandles() argument
407 struct node *root = dti->dt; in check_explicit_phandles()
408 struct node *other; in check_explicit_phandles()
412 assert(!node->phandle); in check_explicit_phandles()
414 phandle = check_phandle_prop(c, dti, node, "phandle"); in check_explicit_phandles()
416 linux_phandle = check_phandle_prop(c, dti, node, "linux,phandle"); in check_explicit_phandles()
424 " properties", node->fullpath); in check_explicit_phandles()
430 if (other && (other != node)) { in check_explicit_phandles()
432 node->fullpath, phandle, other->fullpath); in check_explicit_phandles()
436 node->phandle = phandle; in check_explicit_phandles()
441 struct node *node) in check_name_properties() argument
445 for (pp = &node->proplist; *pp; pp = &((*pp)->next)) in check_name_properties()
454 if ((prop->val.len != node->basenamelen+1) in check_name_properties()
455 || (memcmp(prop->val.val, node->name, node->basenamelen) != 0)) { in check_name_properties()
457 " of base node name)", node->fullpath, prop->val.val); in check_name_properties()
475 struct node *node) in fixup_phandle_references() argument
477 struct node *dt = dti->dt; in fixup_phandle_references()
480 for_each_property(node, prop) { in fixup_phandle_references()
482 struct node *refnode; in fixup_phandle_references()
508 struct node *node) in fixup_path_references() argument
510 struct node *dt = dti->dt; in fixup_path_references()
513 for_each_property(node, prop) { in fixup_path_references()
515 struct node *refnode; in fixup_path_references()
548 struct node *node) in fixup_addr_size_cells() argument
552 node->addr_cells = -1; in fixup_addr_size_cells()
553 node->size_cells = -1; in fixup_addr_size_cells()
555 prop = get_property(node, "#address-cells"); in fixup_addr_size_cells()
557 node->addr_cells = propval_cell(prop); in fixup_addr_size_cells()
559 prop = get_property(node, "#size-cells"); in fixup_addr_size_cells()
561 node->size_cells = propval_cell(prop); in fixup_addr_size_cells()
572 struct node *node) in check_reg_format() argument
577 prop = get_property(node, "reg"); in check_reg_format()
581 if (!node->parent) { in check_reg_format()
587 FAIL(c, "\"reg\" property in %s is empty", node->fullpath); in check_reg_format()
589 addr_cells = node_addr_cells(node->parent); in check_reg_format()
590 size_cells = node_size_cells(node->parent); in check_reg_format()
596 node->fullpath, prop->val.len, addr_cells, size_cells); in check_reg_format()
601 struct node *node) in check_ranges_format() argument
606 prop = get_property(node, "ranges"); in check_ranges_format()
610 if (!node->parent) { in check_ranges_format()
615 p_addr_cells = node_addr_cells(node->parent); in check_ranges_format()
616 p_size_cells = node_size_cells(node->parent); in check_ranges_format()
617 c_addr_cells = node_addr_cells(node); in check_ranges_format()
618 c_size_cells = node_size_cells(node); in check_ranges_format()
625 node->fullpath, c_addr_cells, node->parent->fullpath, in check_ranges_format()
630 node->fullpath, c_size_cells, node->parent->fullpath, in check_ranges_format()
635 "#size-cells == %d)", node->fullpath, prop->val.len, in check_ranges_format()
645 struct node *node) in check_avoid_default_addr_size() argument
649 if (!node->parent) in check_avoid_default_addr_size()
652 reg = get_property(node, "reg"); in check_avoid_default_addr_size()
653 ranges = get_property(node, "ranges"); in check_avoid_default_addr_size()
658 if (node->parent->addr_cells == -1) in check_avoid_default_addr_size()
660 node->fullpath); in check_avoid_default_addr_size()
662 if (node->parent->size_cells == -1) in check_avoid_default_addr_size()
664 node->fullpath); in check_avoid_default_addr_size()
671 struct node *node) in check_obsolete_chosen_interrupt_controller() argument
673 struct node *dt = dti->dt; in check_obsolete_chosen_interrupt_controller()
674 struct node *chosen; in check_obsolete_chosen_interrupt_controller()
677 if (node != dt) in check_obsolete_chosen_interrupt_controller()