Lines Matching +full:bool +full:- +full:property

1 // SPDX-License-Identifier: GPL-2.0-or-later
12 fprintf(stderr, "=== %s: ", (c)->name); \
35 bool warn, error;
37 bool inprogress;
63 struct property *prop,
71 if (!(c->warn && (quiet < 1)) && !(c->error && (quiet < 2)))
74 if (prop && prop->srcpos)
75 pos = prop->srcpos;
76 else if (node && node->srcpos)
77 pos = node->srcpos;
83 } else if (streq(dti->outname, "-")) {
86 xasprintf(&str, "%s", dti->outname);
90 (c->error) ? "ERROR" : "Warning", c->name);
94 xasprintf_append(&str, "%s:%s: ", node->fullpath, prop->name);
96 xasprintf_append(&str, "%s: ", node->fullpath);
106 pos = node->srcpos;
107 while (pos->next) {
108 pos = pos->next;
123 (c)->status = FAILED; \
130 (c)->status = FAILED; \
139 TRACE(c, "%s", node->fullpath);
140 if (c->fn)
141 c->fn(c, dti, node);
147 static bool is_multiple_of(int multiple, int divisor)
155 static bool run_check(struct check *c, struct dt_info *dti)
157 struct node *dt = dti->dt;
158 bool error = false;
161 assert(!c->inprogress);
163 if (c->status != UNCHECKED)
166 c->inprogress = true;
168 for (i = 0; i < c->num_prereqs; i++) {
169 struct check *prq = c->prereq[i];
171 if (prq->status != PASSED) {
172 c->status = PREREQ;
174 c->prereq[i]->name);
178 if (c->status != UNCHECKED)
183 if (c->status == UNCHECKED)
184 c->status = PASSED;
186 TRACE(c, "\tCompleted, status %d", c->status);
189 c->inprogress = false;
190 if ((c->status != PASSED) && (c->error))
210 struct property *prop;
211 const char *propname = c->data;
217 if (!data_is_one_string(prop->val))
218 FAIL_PROP(c, dti, node, prop, "property is not a string");
229 struct property *prop;
230 const char *propname = c->data;
237 str = prop->val.val;
238 rem = prop->val.len;
242 FAIL_PROP(c, dti, node, prop, "property is not a string list");
245 rem -= l + 1;
257 struct property *prop;
258 const char *propname = c->data;
264 if (prop->val.len != sizeof(cell_t))
265 FAIL_PROP(c, dti, node, prop, "property is not a single cell");
282 for (child2 = child->next_sibling;
284 child2 = child2->next_sibling)
285 if (streq(child->name, child2->name))
293 struct property *prop, *prop2;
296 for (prop2 = prop->next; prop2; prop2 = prop2->next) {
297 if (prop2->deleted)
299 if (streq(prop->name, prop2->name))
300 FAIL_PROP(c, dti, node, prop, "Duplicate property name");
309 #define NODECHARS LOWERCASE UPPERCASE DIGITS ",._+-@"
310 #define PROPCHARS LOWERCASE UPPERCASE DIGITS ",._+*#?-"
311 #define PROPNODECHARSSTRICT LOWERCASE UPPERCASE DIGITS ",-"
316 size_t n = strspn(node->name, c->data);
318 if (n < strlen(node->name))
320 node->name[n]);
327 int n = strspn(node->name, c->data);
329 if (n < node->basenamelen)
331 node->name[n]);
347 if (!node->parent)
350 if (get_property(node->parent, node->name)) {
351 FAIL(c, dti, node, "node name and property name conflict");
361 struct property *prop = get_property(node, "reg");
370 if (prop && !prop->val.len)
376 FAIL(c, dti, node, "node has a reg or ranges property, but no unit name");
379 FAIL(c, dti, node, "node has a unit name, but no reg or ranges property");
387 struct property *prop;
390 size_t n = strspn(prop->name, c->data);
392 if (n < strlen(prop->name))
393 FAIL_PROP(c, dti, node, prop, "Bad character '%c' in property name",
394 prop->name[n]);
403 struct property *prop;
406 const char *name = prop->name;
407 size_t n = strspn(name, c->data);
409 if (n == strlen(prop->name))
417 * # is only allowed at the beginning of property names not counting
420 if (name[n] == '#' && ((n == 0) || (name[n-1] == ','))) {
422 n = strspn(name, c->data);
425 FAIL_PROP(c, dti, node, prop, "Character '%c' not recommended in property name",
435 ((prop) ? (prop)->name : ""), \
436 ((prop) ? "' in " : ""), (node)->fullpath
440 struct property *prop, struct marker *mark)
442 struct node *dt = dti->dt;
444 struct property *otherprop = NULL;
469 struct property *prop;
471 for_each_label(node->labels, l)
472 check_duplicate_label(c, dti, l->label, node, NULL, NULL);
475 struct marker *m = prop->val.markers;
477 for_each_label(prop->labels, l)
478 check_duplicate_label(c, dti, l->label, node, prop, NULL);
481 check_duplicate_label(c, dti, m->ref, node, prop, m);
489 struct node *root = dti->dt;
490 struct property *prop;
498 if (prop->val.len != sizeof(cell_t)) {
499 FAIL_PROP(c, dti, node, prop, "bad length (%d) %s property",
500 prop->val.len, prop->name);
504 m = prop->val.markers;
506 assert(m->offset == 0);
507 if (node != get_node_by_ref(root, m->ref))
512 prop->name);
515 * phandle is allowed - that means allocate a unique
525 FAIL_PROP(c, dti, node, prop, "bad value (0x%x) in %s property",
526 phandle, prop->name);
536 struct node *root = dti->dt;
541 assert(!node->phandle);
561 phandle, other->fullpath);
565 node->phandle = phandle;
572 struct property **pp, *prop = NULL;
574 for (pp = &node->proplist; *pp; pp = &((*pp)->next))
575 if (streq((*pp)->name, "name")) {
581 return; /* No name property, that's fine */
583 if ((prop->val.len != node->basenamelen + 1U)
584 || (memcmp(prop->val.val, node->name, node->basenamelen) != 0)) {
585 FAIL(c, dti, node, "\"name\" property is incorrect (\"%s\" instead"
586 " of base node name)", prop->val.val);
588 /* The name property is correct, and therefore redundant.
590 *pp = prop->next;
591 free(prop->name);
592 data_free(prop->val);
606 struct node *dt = dti->dt;
607 struct property *prop;
610 struct marker *m = prop->val.markers;
615 assert(m->offset + sizeof(cell_t) <= prop->val.len);
617 refnode = get_node_by_ref(dt, m->ref);
619 if (!(dti->dtsflags & DTSF_PLUGIN))
620 FAIL(c, dti, node, "Reference to non-existent node or "
621 "label \"%s\"\n", m->ref);
623 *((fdt32_t *)(prop->val.val + m->offset)) =
629 *((fdt32_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle);
641 struct node *dt = dti->dt;
642 struct property *prop;
645 struct marker *m = prop->val.markers;
650 assert(m->offset <= prop->val.len);
652 refnode = get_node_by_ref(dt, m->ref);
654 FAIL(c, dti, node, "Reference to non-existent node or label \"%s\"\n",
655 m->ref);
659 path = refnode->fullpath;
660 prop->val = data_insert_at_marker(prop->val, m, path,
672 if (generate_symbols && node->labels)
674 if (node->omit_if_unused && !node->is_referenced)
682 WARNING_IF_NOT_CELL(address_cells_is_cell, "#address-cells");
683 WARNING_IF_NOT_CELL(size_cells_is_cell, "#size-cells");
695 struct property *prop;
698 if (!strends(prop->name, "-names"))
701 c->data = prop->name;
710 struct property *prop;
712 if (!streq(node->name, "aliases"))
716 if (streq(prop->name, "phandle")
717 || streq(prop->name, "linux,phandle")) {
721 if (!prop->val.val || !get_node_by_path(dti->dt, prop->val.val)) {
722 FAIL_PROP(c, dti, node, prop, "aliases property is not a valid node (%s)",
723 prop->val.val);
726 if (strspn(prop->name, LOWERCASE DIGITS "-") != strlen(prop->name))
727 FAIL(c, dti, node, "aliases property name must include only lowercase and '-'");
735 struct property *prop;
737 node->addr_cells = -1;
738 node->size_cells = -1;
740 prop = get_property(node, "#address-cells");
742 node->addr_cells = propval_cell(prop);
744 prop = get_property(node, "#size-cells");
746 node->size_cells = propval_cell(prop);
752 (((n)->addr_cells == -1) ? 2 : (n)->addr_cells)
754 (((n)->size_cells == -1) ? 1 : (n)->size_cells)
759 struct property *prop;
766 if (!node->parent) {
767 FAIL(c, dti, node, "Root node has a \"reg\" property");
771 if (prop->val.len == 0)
772 FAIL_PROP(c, dti, node, prop, "property is empty");
774 addr_cells = node_addr_cells(node->parent);
775 size_cells = node_size_cells(node->parent);
778 if (!is_multiple_of(prop->val.len, entrylen))
779 FAIL_PROP(c, dti, node, prop, "property has invalid length (%d bytes) "
780 "(#address-cells == %d, #size-cells == %d)",
781 prop->val.len, addr_cells, size_cells);
788 struct property *prop;
790 const char *ranges = c->data;
796 if (!node->parent) {
797 FAIL_PROP(c, dti, node, prop, "Root node has a \"%s\" property",
802 p_addr_cells = node_addr_cells(node->parent);
803 p_size_cells = node_size_cells(node->parent);
808 if (prop->val.len == 0) {
810 FAIL_PROP(c, dti, node, prop, "empty \"%s\" property but its "
811 "#address-cells (%d) differs from %s (%d)",
812 ranges, c_addr_cells, node->parent->fullpath,
815 FAIL_PROP(c, dti, node, prop, "empty \"%s\" property but its "
816 "#size-cells (%d) differs from %s (%d)",
817 ranges, c_size_cells, node->parent->fullpath,
819 } else if (!is_multiple_of(prop->val.len, entrylen)) {
820 FAIL_PROP(c, dti, node, prop, "\"%s\" property has invalid length (%d bytes) "
821 "(parent #address-cells == %d, child #address-cells == %d, "
822 "#size-cells == %d)", ranges, prop->val.len,
827 WARNING(dma_ranges_format, check_ranges_format, "dma-ranges", &addr_size_cells);
835 struct property *prop;
839 if (!prop || !streq(prop->val.val, "pci"))
842 node->bus = &pci_bus;
844 if (!strprefixeq(node->name, node->basenamelen, "pci") &&
845 !strprefixeq(node->name, node->basenamelen, "pcie"))
853 FAIL(c, dti, node, "incorrect #address-cells for PCI bridge");
855 FAIL(c, dti, node, "incorrect #size-cells for PCI bridge");
857 prop = get_property(node, "bus-range");
861 if (prop->val.len != (sizeof(cell_t) * 2)) {
865 cells = (cell_t *)prop->val.val;
876 struct property *prop;
880 if (!node->parent || (node->parent->bus != &pci_bus))
887 cells = (cell_t *)prop->val.val;
890 prop = get_property(node->parent, "bus-range");
894 cells = (cell_t *)prop->val.val;
899 FAIL_PROP(c, dti, node, prop, "PCI bus number %d out of range, expected (%d - %d)",
906 struct property *prop;
912 if (!node->parent || (node->parent->bus != &pci_bus))
919 cells = (cell_t *)prop->val.val;
948 .name = "simple-bus",
951 static bool node_is_compatible(struct node *node, const char *compat)
953 struct property *prop;
960 for (str = prop->val.val, end = str + prop->val.len; str < end;
961 str += strnlen(str, end - str) + 1) {
970 if (node_is_compatible(node, "simple-bus"))
971 node->bus = &simple_bus;
978 struct property *prop;
985 if (!node->parent || (node->parent->bus != &simple_bus))
990 cells = (cell_t *)prop->val.val;
993 if (prop && prop->val.len)
995 cells = ((cell_t *)prop->val.val) + node_addr_cells(node);
999 if (node->parent->parent && !(node->bus == &simple_bus))
1000 FAIL(c, dti, node, "missing or empty reg/ranges property");
1004 size = node_addr_cells(node->parent);
1005 while (size--)
1010 FAIL(c, dti, node, "simple-bus unit address format error, expected \"%s\"",
1016 .name = "i2c-bus",
1021 if (strprefixeq(node->name, node->basenamelen, "i2c-bus") ||
1022 strprefixeq(node->name, node->basenamelen, "i2c-arb")) {
1023 node->bus = &i2c_bus;
1024 } else if (strprefixeq(node->name, node->basenamelen, "i2c")) {
1027 if (strprefixeq(child->name, child->basenamelen, "i2c-bus"))
1030 node->bus = &i2c_bus;
1034 if (!node->children)
1038 FAIL(c, dti, node, "incorrect #address-cells for I2C bus");
1040 FAIL(c, dti, node, "incorrect #size-cells for I2C bus");
1050 struct property *prop;
1057 if (!node->parent || (node->parent->bus != &i2c_bus))
1062 cells = (cell_t *)prop->val.val;
1065 FAIL(c, dti, node, "missing or empty reg property");
1077 for (len = prop->val.len; len > 0; len -= 4) {
1084 FAIL_PROP(c, dti, node, prop, "I2C address must be less than 10-bits, got \"0x%x\"",
1087 FAIL_PROP(c, dti, node, prop, "I2C address must be less than 7-bits, got \"0x%x\". Set I2C_TEN_BIT_ADDRESS for 10 bit addresses or fix the property",
1094 .name = "spi-bus",
1101 if (strprefixeq(node->name, node->basenamelen, "spi")) {
1102 node->bus = &spi_bus;
1111 struct property *prop;
1113 if (strstarts(prop->name, "spi-")) {
1114 node->bus = &spi_bus;
1118 if (node->bus == &spi_bus)
1122 if (node->bus == &spi_bus && get_property(node, "reg"))
1125 if (node->bus != &spi_bus || !node->children)
1128 if (get_property(node, "spi-slave"))
1131 FAIL(c, dti, node, "incorrect #address-cells for SPI bus");
1133 FAIL(c, dti, node, "incorrect #size-cells for SPI bus");
1140 struct property *prop;
1146 if (!node->parent || (node->parent->bus != &spi_bus))
1149 if (get_property(node->parent, "spi-slave"))
1154 cells = (cell_t *)prop->val.val;
1157 FAIL(c, dti, node, "missing or empty reg property");
1174 if (node->parent && node->parent->bus)
1197 struct property *reg, *ranges;
1199 if (!node->parent)
1208 if (node->parent->addr_cells == -1)
1209 FAIL(c, dti, node, "Relying on default #address-cells value");
1211 if (node->parent->size_cells == -1)
1212 FAIL(c, dti, node, "Relying on default #size-cells value");
1222 if (!node->parent || node->addr_cells < 0 || node->size_cells < 0)
1225 if (get_property(node, "ranges") || get_property(node, "dma-ranges") || !node->children)
1231 * the parent bus (no 'ranges' property on node), children can
1234 * child nodes then make #address-cells/#size-cells necessary:
1240 FAIL(c, dti, node, "unnecessary #address-cells/#size-cells without \"ranges\", \"dma-ranges\" or child \"reg\" or \"ranges\" property");
1244 static bool node_is_disabled(struct node *node)
1246 struct property *prop;
1250 char *str = prop->val.val;
1261 bool disable_check)
1265 if (node->addr_cells < 0 || node->size_cells < 0)
1268 if (!node->children)
1290 FAIL(c, dti, childb, "duplicate unit-address (also used in node %s)", childa->fullpath);
1314 struct node *dt = dti->dt;
1316 struct property *prop;
1326 prop = get_property(chosen, "interrupt-controller");
1329 "/chosen has obsolete \"interrupt-controller\" property");
1337 if (!streq(node->name, "chosen"))
1340 if (node->parent != dti->dt)
1348 struct property *prop;
1350 if (!streq(node->name, "chosen"))
1357 c->data = prop->name;
1365 struct property *prop;
1367 if (!streq(node->name, "chosen"))
1370 prop = get_property(node, "stdout-path");
1372 prop = get_property(node, "linux,stdout-path");
1375 FAIL_PROP(c, dti, node, prop, "Use 'stdout-path' instead");
1378 c->data = prop->name;
1386 bool optional;
1392 struct property *prop,
1395 struct node *root = dti->dt;
1398 if (!is_multiple_of(prop->val.len, sizeof(cell_t))) {
1400 "property size (%d) is invalid, expected multiple of %zu",
1401 prop->val.len, sizeof(cell_t));
1405 for (cell = 0; cell < prop->val.len / sizeof(cell_t); cell += cellsize + 1) {
1407 struct property *cellprop;
1413 * Some bindings use a cell value 0 or -1 to skip over optional
1418 if (dti->dtsflags & DTSF_PLUGIN)
1426 if (prop->val.markers) {
1427 struct marker *m = prop->val.markers;
1429 if (m->offset == (cell * sizeof(cell_t)))
1446 cellprop = get_property(provider_node, provider->cell_name);
1449 } else if (provider->optional) {
1452 FAIL(c, dti, node, "Missing property '%s' in node %s or bad phandle (referred from %s[%d])",
1453 provider->cell_name,
1454 provider_node->fullpath,
1455 prop->name, cell);
1460 if ((expected <= cell) || prop->val.len < expected) {
1462 "property size (%d) too small for cell size %u",
1463 prop->val.len, cellsize);
1473 const struct provider *provider = c->data;
1474 struct property *prop;
1476 prop = get_property(node, provider->prop_name);
1487 WARNING_PROPERTY_PHANDLE_CELLS(clocks, "clocks", "#clock-cells");
1488 WARNING_PROPERTY_PHANDLE_CELLS(cooling_device, "cooling-device", "#cooling-cells");
1489 WARNING_PROPERTY_PHANDLE_CELLS(dmas, "dmas", "#dma-cells");
1490 WARNING_PROPERTY_PHANDLE_CELLS(hwlocks, "hwlocks", "#hwlock-cells");
1491 WARNING_PROPERTY_PHANDLE_CELLS(interrupts_extended, "interrupts-extended", "#interrupt-cells");
1492 WARNING_PROPERTY_PHANDLE_CELLS(io_channels, "io-channels", "#io-channel-cells");
1493 WARNING_PROPERTY_PHANDLE_CELLS(iommus, "iommus", "#iommu-cells");
1494 WARNING_PROPERTY_PHANDLE_CELLS(mboxes, "mboxes", "#mbox-cells");
1495 WARNING_PROPERTY_PHANDLE_CELLS(msi_parent, "msi-parent", "#msi-cells", true);
1496 WARNING_PROPERTY_PHANDLE_CELLS(mux_controls, "mux-controls", "#mux-control-cells");
1497 WARNING_PROPERTY_PHANDLE_CELLS(phys, "phys", "#phy-cells");
1498 WARNING_PROPERTY_PHANDLE_CELLS(power_domains, "power-domains", "#power-domain-cells");
1499 WARNING_PROPERTY_PHANDLE_CELLS(pwms, "pwms", "#pwm-cells");
1500 WARNING_PROPERTY_PHANDLE_CELLS(resets, "resets", "#reset-cells");
1501 WARNING_PROPERTY_PHANDLE_CELLS(sound_dai, "sound-dai", "#sound-dai-cells");
1502 WARNING_PROPERTY_PHANDLE_CELLS(thermal_sensors, "thermal-sensors", "#thermal-sensor-cells");
1504 static bool prop_is_gpio(struct property *prop)
1507 * *-gpios and *-gpio can appear in property names,
1510 if (strends(prop->name, ",nr-gpios"))
1513 return strends(prop->name, "-gpios") ||
1514 streq(prop->name, "gpios") ||
1515 strends(prop->name, "-gpio") ||
1516 streq(prop->name, "gpio");
1523 struct property *prop;
1525 /* Skip GPIO hog nodes which have 'gpios' property */
1526 if (get_property(node, "gpio-hog"))
1535 provider.prop_name = prop->name;
1536 provider.cell_name = "#gpio-cells";
1548 struct property *prop;
1554 if (!strends(prop->name, "gpio"))
1558 "'[*-]gpio' is deprecated, use '[*-]gpios' instead");
1564 static bool node_is_interrupt_provider(struct node *node)
1566 struct property *prop;
1568 prop = get_property(node, "interrupt-controller");
1572 prop = get_property(node, "interrupt-map");
1583 struct property *prop;
1584 bool irq_provider = node_is_interrupt_provider(node);
1586 prop = get_property(node, "#interrupt-cells");
1589 "Missing '#interrupt-cells' in interrupt provider");
1595 "'#interrupt-cells' found, but node is not an interrupt provider");
1605 struct node *root = dti->dt;
1606 struct property *prop, *irq_map_prop;
1609 irq_map_prop = get_property(node, "interrupt-map");
1613 if (node->addr_cells < 0) {
1615 "Missing '#address-cells' in interrupt-map provider");
1619 cellsize += propval_cell(get_property(node, "#interrupt-cells"));
1621 prop = get_property(node, "interrupt-map-mask");
1622 if (prop && (prop->val.len != (cellsize * sizeof(cell_t))))
1624 "property size (%d) is invalid, expected %zu",
1625 prop->val.len, cellsize * sizeof(cell_t));
1627 if (!is_multiple_of(irq_map_prop->val.len, sizeof(cell_t))) {
1629 "property size (%d) is invalid, expected multiple of %zu",
1630 irq_map_prop->val.len, sizeof(cell_t));
1634 map_cells = irq_map_prop->val.len / sizeof(cell_t);
1637 struct property *cellprop;
1643 "property size (%d) too small, expected > %zu",
1644 irq_map_prop->val.len, (cell + cellsize) * sizeof(cell_t));
1652 if (!(dti->dtsflags & DTSF_PLUGIN))
1667 cellprop = get_property(provider_node, "#interrupt-cells");
1671 FAIL(c, dti, node, "Missing property '#interrupt-cells' in node %s or bad phandle (referred from interrupt-map[%zu])",
1672 provider_node->fullpath, cell);
1676 cellprop = get_property(provider_node, "#address-cells");
1681 "Missing property '#address-cells' in node %s, using 0 as fallback",
1682 provider_node->fullpath);
1687 "property size (%d) mismatch, expected %zu",
1688 irq_map_prop->val.len, cell * sizeof(cell_t));
1697 struct node *root = dti->dt;
1699 struct property *irq_prop, *prop = NULL;
1706 if (!is_multiple_of(irq_prop->val.len, sizeof(cell_t)))
1708 irq_prop->val.len, sizeof(cell_t));
1716 prop = get_property(parent, "interrupt-parent");
1722 if (dti->dtsflags & DTSF_PLUGIN)
1735 "Missing interrupt-controller or interrupt-map property");
1740 parent = parent->parent;
1744 FAIL(c, dti, node, "Missing interrupt-parent");
1748 prop = get_property(irq_node, "#interrupt-cells");
1755 if (!is_multiple_of(irq_prop->val.len, irq_cells * sizeof(cell_t))) {
1758 irq_prop->val.len, (int)(irq_cells * sizeof(cell_t)));
1764 .name = "graph-port",
1768 .name = "graph-ports",
1777 if (!(strprefixeq(child->name, child->basenamelen, "endpoint") ||
1778 get_property(child, "remote-endpoint")))
1782 if (!node->parent) {
1783 FAIL(c, dti, node, "root node contains endpoint node '%s', potentially misplaced remote-endpoint property", child->name);
1786 node->bus = &graph_port_bus;
1789 if (!node->parent->bus &&
1790 (streq(node->parent->name, "ports") || get_property(node, "reg")))
1791 node->parent->bus = &graph_ports_bus;
1804 struct property *prop;
1810 if (!(prop->val.val && prop->val.len == sizeof(cell_t))) {
1811 FAIL(c, dti, node, "graph node malformed 'reg' property");
1820 if (node->parent->addr_cells != 1)
1821 FAIL_PROP(c, dti, node, get_property(node, "#address-cells"),
1822 "graph node '#address-cells' is %d, must be 1",
1823 node->parent->addr_cells);
1824 if (node->parent->size_cells != 0)
1825 FAIL_PROP(c, dti, node, get_property(node, "#size-cells"),
1826 "graph node '#size-cells' is %d, must be 0",
1827 node->parent->size_cells);
1833 if (node->bus != &graph_port_bus)
1839 if (dti->dtsflags & DTSF_PLUGIN)
1842 if (!strprefixeq(node->name, node->basenamelen, "port"))
1852 struct property *prop;
1854 prop = get_property(endpoint, "remote-endpoint");
1863 node = get_node_by_phandle(dti->dt, phandle);
1875 if (!node->parent || node->parent->bus != &graph_port_bus)
1881 if (dti->dtsflags & DTSF_PLUGIN)
1884 if (!strprefixeq(node->name, node->basenamelen, "endpoint"))
1893 remote_node->fullpath);
1903 if (node->bus != &graph_ports_bus && node->bus != &graph_port_bus)
1907 struct property *prop = get_property(child, "reg");
1909 /* No error if we have any non-zero unit address */
1916 if (cnt == 1 && node->addr_cells != -1)
1917 FAIL(c, dti, node, "graph node has single child node '%s', #address-cells/#size-cells are not necessary",
1918 node->children->name);
2013 static void enable_warning_error(struct check *c, bool warn, bool error)
2018 if ((warn && !c->warn) || (error && !c->error))
2019 for (i = 0; i < c->num_prereqs; i++)
2020 enable_warning_error(c->prereq[i], warn, error);
2022 c->warn = c->warn || warn;
2023 c->error = c->error || error;
2026 static void disable_warning_error(struct check *c, bool warn, bool error)
2032 if ((warn && c->warn) || (error && c->error)) {
2037 for (j = 0; j < cc->num_prereqs; j++)
2038 if (cc->prereq[j] == c)
2043 c->warn = c->warn && !warn;
2044 c->error = c->error && !error;
2047 void parse_checks_option(bool warn, bool error, const char *arg)
2051 bool enable = true;
2053 if ((strncmp(arg, "no-", 3) == 0)
2062 if (streq(c->name, name)) {
2074 void process_checks(bool force, struct dt_info *dti)
2082 if (c->warn || c->error)
2089 "(use -f to force output)\n");