Lines Matching refs:part

163 	struct flex_array_part *part = fa->parts[part_nr];  in __fa_get_part()  local
164 if (!part) { in __fa_get_part()
165 part = kmalloc(sizeof(struct flex_array_part), flags); in __fa_get_part()
166 if (!part) in __fa_get_part()
169 memset(part, FLEX_ARRAY_FREE, in __fa_get_part()
171 fa->parts[part_nr] = part; in __fa_get_part()
173 return part; in __fa_get_part()
197 struct flex_array_part *part; in flex_array_put() local
205 part = (struct flex_array_part *)&fa->parts[0]; in flex_array_put()
208 part = __fa_get_part(fa, part_nr, flags); in flex_array_put()
209 if (!part) in flex_array_put()
212 dst = &part->elements[index_inside_part(fa, element_nr, part_nr)]; in flex_array_put()
228 struct flex_array_part *part; in flex_array_clear() local
236 part = (struct flex_array_part *)&fa->parts[0]; in flex_array_clear()
239 part = fa->parts[part_nr]; in flex_array_clear()
240 if (!part) in flex_array_clear()
243 dst = &part->elements[index_inside_part(fa, element_nr, part_nr)]; in flex_array_clear()
270 struct flex_array_part *part; in flex_array_prealloc() local
290 part = __fa_get_part(fa, part_nr, flags); in flex_array_prealloc()
291 if (!part) in flex_array_prealloc()
313 struct flex_array_part *part; in flex_array_get() local
320 part = (struct flex_array_part *)&fa->parts[0]; in flex_array_get()
323 part = fa->parts[part_nr]; in flex_array_get()
324 if (!part) in flex_array_get()
327 return &part->elements[index_inside_part(fa, element_nr, part_nr)]; in flex_array_get()
352 static int part_is_free(struct flex_array_part *part) in part_is_free() argument
357 if (part->elements[i] != FLEX_ARRAY_FREE) in part_is_free()
373 struct flex_array_part *part; in flex_array_shrink() local
382 part = fa->parts[part_nr]; in flex_array_shrink()
383 if (!part) in flex_array_shrink()
385 if (part_is_free(part)) { in flex_array_shrink()
387 kfree(part); in flex_array_shrink()