Lines Matching refs:part_nr
139 int part_nr; in flex_array_free_parts() local
143 for (part_nr = 0; part_nr < FLEX_ARRAY_NR_BASE_PTRS; part_nr++) in flex_array_free_parts()
144 kfree(fa->parts[part_nr]); in flex_array_free_parts()
157 unsigned int part_nr) in index_inside_part() argument
161 part_offset = element_nr - part_nr * fa->elems_per_part; in index_inside_part()
166 __fa_get_part(struct flex_array *fa, int part_nr, gfp_t flags) in __fa_get_part() argument
168 struct flex_array_part *part = fa->parts[part_nr]; in __fa_get_part()
176 fa->parts[part_nr] = part; in __fa_get_part()
201 int part_nr = 0; in flex_array_put() local
212 part_nr = fa_element_to_part_nr(fa, element_nr); in flex_array_put()
213 part = __fa_get_part(fa, part_nr, flags); in flex_array_put()
217 dst = &part->elements[index_inside_part(fa, element_nr, part_nr)]; in flex_array_put()
232 int part_nr = 0; in flex_array_clear() local
243 part_nr = fa_element_to_part_nr(fa, element_nr); in flex_array_clear()
244 part = fa->parts[part_nr]; in flex_array_clear()
248 dst = &part->elements[index_inside_part(fa, element_nr, part_nr)]; in flex_array_clear()
273 int part_nr; in flex_array_prealloc() local
294 for (part_nr = start_part; part_nr <= end_part; part_nr++) { in flex_array_prealloc()
295 part = __fa_get_part(fa, part_nr, flags); in flex_array_prealloc()
317 int part_nr = 0; in flex_array_get() local
327 part_nr = fa_element_to_part_nr(fa, element_nr); in flex_array_get()
328 part = fa->parts[part_nr]; in flex_array_get()
332 return &part->elements[index_inside_part(fa, element_nr, part_nr)]; in flex_array_get()
379 int part_nr; in flex_array_shrink() local
386 for (part_nr = 0; part_nr < FLEX_ARRAY_NR_BASE_PTRS; part_nr++) { in flex_array_shrink()
387 part = fa->parts[part_nr]; in flex_array_shrink()
391 fa->parts[part_nr] = NULL; in flex_array_shrink()