Lines Matching full:if
19 if (!p || olen < len) in fdt_nodename_eq_()
23 if (memcmp(p, s, len) != 0) in fdt_nodename_eq_()
26 if (p[len] == '\0') in fdt_nodename_eq_()
28 else if (!memchr(s, '@', len) && (p[len] == '@')) in fdt_nodename_eq_()
42 if (can_assume(VALID_INPUT)) { in fdt_get_string()
45 if (lenp) in fdt_get_string()
51 if (totalsize < 0) in fdt_get_string()
56 if (absoffset >= (unsigned)totalsize) in fdt_get_string()
60 if (fdt_magic(fdt) == FDT_MAGIC) { in fdt_get_string()
61 if (stroffset < 0) in fdt_get_string()
63 if (can_assume(LATEST) || fdt_version(fdt) >= 17) { in fdt_get_string()
64 if ((unsigned)stroffset >= fdt_size_dt_strings(fdt)) in fdt_get_string()
66 if ((fdt_size_dt_strings(fdt) - stroffset) < len) in fdt_get_string()
69 } else if (fdt_magic(fdt) == FDT_SW_MAGIC) { in fdt_get_string()
72 if ((stroffset >= 0) || in fdt_get_string()
75 if (sw_stroffset < len) in fdt_get_string()
84 if (!n) { in fdt_get_string()
90 if (lenp) in fdt_get_string()
95 if (lenp) in fdt_get_string()
123 if (offset < 0) { in fdt_find_max_phandle()
124 if (offset == -FDT_ERR_NOTFOUND) in fdt_find_max_phandle()
132 if (value > max) in fdt_find_max_phandle()
136 if (phandle) in fdt_find_max_phandle()
148 if (err < 0) in fdt_generate_phandle()
151 if (max == FDT_MAX_PHANDLE) in fdt_generate_phandle()
154 if (phandle) in fdt_generate_phandle()
165 if (!can_assume(VALID_INPUT)) { in fdt_mem_rsv()
166 if (absoffset < fdt_off_mem_rsvmap(fdt)) in fdt_mem_rsv()
168 if (absoffset > fdt_totalsize(fdt) - in fdt_mem_rsv()
181 if (!can_assume(VALID_INPUT) && !re) in fdt_get_mem_rsv()
195 if (fdt64_ld_(&re->size) == 0) in fdt_num_mem_rsv()
211 if (nextoffset >= 0) in nextprop_()
235 if ((depth == 1) in fdt_subnode_offset_namelen()
239 if (depth < 0) in fdt_subnode_offset_namelen()
258 /* see if we have an alias */ in fdt_path_offset_namelen()
259 if (*path != '/') { in fdt_path_offset_namelen()
262 if (!q) in fdt_path_offset_namelen()
266 if (!p) in fdt_path_offset_namelen()
278 if (p == end) in fdt_path_offset_namelen()
282 if (! q) in fdt_path_offset_namelen()
286 if (offset < 0) in fdt_path_offset_namelen()
306 if (((err = fdt_ro_probe_(fdt)) < 0) in fdt_get_name()
312 if (!can_assume(LATEST) && fdt_version(fdt) < 0x10) { in fdt_get_name()
320 if (leaf == NULL) { in fdt_get_name()
327 if (len) in fdt_get_name()
333 if (len) in fdt_get_name()
342 if ((offset = fdt_check_node_offset_(fdt, nodeoffset)) < 0) in fdt_first_property_offset()
350 if ((offset = fdt_check_prop_offset_(fdt, offset)) < 0) in fdt_next_property_offset()
363 if (!can_assume(VALID_INPUT) && in fdt_get_property_by_offset_()
365 if (lenp) in fdt_get_property_by_offset_()
372 if (lenp) in fdt_get_property_by_offset_()
385 if (!can_assume(LATEST) && fdt_version(fdt) < 0x10) { in fdt_get_property_by_offset()
386 if (lenp) in fdt_get_property_by_offset()
407 if (!can_assume(LIBFDT_FLAWLESS) && !prop) { in fdt_get_property_namelen_()
411 if (fdt_string_eq_(fdt, fdt32_ld_(&prop->nameoff), in fdt_get_property_namelen_()
413 if (poffset) in fdt_get_property_namelen_()
419 if (lenp) in fdt_get_property_namelen_()
432 if (!can_assume(LATEST) && fdt_version(fdt) < 0x10) { in fdt_get_property_namelen()
433 if (lenp) in fdt_get_property_namelen()
459 if (!prop) in fdt_getprop_namelen()
463 if (!can_assume(LATEST) && fdt_version(fdt) < 0x10 && in fdt_getprop_namelen()
475 if (!prop) in fdt_getprop_by_offset()
477 if (namep) { in fdt_getprop_by_offset()
481 if (!can_assume(VALID_INPUT)) { in fdt_getprop_by_offset()
484 if (!name) { in fdt_getprop_by_offset()
485 if (lenp) in fdt_getprop_by_offset()
496 if (!can_assume(LATEST) && fdt_version(fdt) < 0x10 && in fdt_getprop_by_offset()
516 if (!php || (len != sizeof(*php))) { in fdt_get_phandle()
518 if (!php || (len != sizeof(*php))) in fdt_get_phandle()
531 if (aliasoffset < 0) in fdt_get_alias_namelen()
550 if (buflen < 2) in fdt_get_path()
563 if (pdepth >= depth) { in fdt_get_path()
565 if (!name) in fdt_get_path()
567 if ((p + namelen + 1) <= buflen) { in fdt_get_path()
575 if (offset == nodeoffset) { in fdt_get_path()
576 if (pdepth < (depth + 1)) in fdt_get_path()
579 if (p > 1) /* special case so that root path is "/", not "" */ in fdt_get_path()
586 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0)) in fdt_get_path()
588 else if (offset == -FDT_ERR_BADOFFSET) in fdt_get_path()
602 if (supernodedepth < 0) in fdt_supernode_atdepth_offset()
608 if (depth == supernodedepth) in fdt_supernode_atdepth_offset()
611 if (offset == nodeoffset) { in fdt_supernode_atdepth_offset()
612 if (nodedepth) in fdt_supernode_atdepth_offset()
615 if (supernodedepth > depth) in fdt_supernode_atdepth_offset()
622 if (!can_assume(VALID_INPUT)) { in fdt_supernode_atdepth_offset()
623 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0)) in fdt_supernode_atdepth_offset()
625 else if (offset == -FDT_ERR_BADOFFSET) in fdt_supernode_atdepth_offset()
638 if (err) in fdt_node_depth()
648 if (nodedepth < 0) in fdt_parent_offset()
665 * property of a node in fdt_getprop(), then if that didn't in fdt_node_offset_by_prop_value()
673 if (val && (len == proplen) in fdt_node_offset_by_prop_value()
685 if ((phandle == 0) || (phandle == ~0U)) in fdt_node_offset_by_phandle()
692 * fdt_get_phandle(), then if that didn't find what in fdt_node_offset_by_phandle()
699 if (fdt_get_phandle(fdt, offset) == phandle) in fdt_node_offset_by_phandle()
712 if (memcmp(str, strlist, len+1) == 0) in fdt_stringlist_contains()
715 if (!p) in fdt_stringlist_contains()
729 if (!list) in fdt_stringlist_count()
737 /* Abort if the last string isn't properly NUL-terminated. */ in fdt_stringlist_count()
738 if (list + length > end) in fdt_stringlist_count()
755 if (!list) in fdt_stringlist_search()
764 /* Abort if the last string isn't properly NUL-terminated. */ in fdt_stringlist_search()
765 if (list + length > end) in fdt_stringlist_search()
768 if (length == len && memcmp(list, string, length) == 0) in fdt_stringlist_search()
786 if (!list) { in fdt_stringlist_get()
787 if (lenp) in fdt_stringlist_get()
798 /* Abort if the last string isn't properly NUL-terminated. */ in fdt_stringlist_get()
799 if (list + length > end) { in fdt_stringlist_get()
800 if (lenp) in fdt_stringlist_get()
806 if (idx == 0) { in fdt_stringlist_get()
807 if (lenp) in fdt_stringlist_get()
817 if (lenp) in fdt_stringlist_get()
830 if (!prop) in fdt_node_check_compatible()
844 * property of a node in fdt_node_check_compatible(), then if in fdt_node_offset_by_compatible()
852 if ((err < 0) && (err != -FDT_ERR_NOTFOUND)) in fdt_node_offset_by_compatible()
854 else if (err == 0) in fdt_node_offset_by_compatible()