Lines Matching refs:nelems
969 int rv, i, j, nelems, cnt; in ofw_bus_parse_xref_list_internal() local
972 nelems = OF_getencprop_alloc_multi(node, list_name, sizeof(*elems), in ofw_bus_parse_xref_list_internal()
974 if (nelems <= 0) in ofw_bus_parse_xref_list_internal()
977 for (i = 0, cnt = 0; i < nelems; i += pcells, cnt++) { in ofw_bus_parse_xref_list_internal()
986 if ((i + pcells) > nelems) { in ofw_bus_parse_xref_list_internal()
1064 int rv, i, cnt, nelems; in ofw_bus_find_string_index() local
1067 nelems = OF_getprop_alloc(node, list_name, (void **)&elems); in ofw_bus_find_string_index()
1068 if (nelems <= 0) in ofw_bus_find_string_index()
1072 for (i = 0, cnt = 0; i < nelems; cnt++) { in ofw_bus_find_string_index()
1095 int i, cnt, nelems, len; in ofw_bus_string_list_to_array() local
1098 nelems = OF_getprop_alloc(node, list_name, (void **)&elems); in ofw_bus_string_list_to_array()
1099 if (nelems <= 0) in ofw_bus_string_list_to_array()
1100 return (nelems); in ofw_bus_string_list_to_array()
1103 for (i = 0, cnt = 0; i < nelems; cnt++) in ofw_bus_string_list_to_array()
1107 array = malloc((cnt + 1) * sizeof(char *) + nelems, M_OFWPROP, in ofw_bus_string_list_to_array()
1114 memcpy(tptr, elems, nelems); in ofw_bus_string_list_to_array()
1118 for (i = 0, cnt = 0; i < nelems; cnt++) { in ofw_bus_string_list_to_array()