Add kerneldoc annotations for function formals of type struct flex_array and gfp_t which are currently lacking.
Showing the changes to lib/flex_array.c (1 of 1 file). Show all
Unified · Split
| @@ -46,6 +46,7 @@ static inline int elements_fit_in_base(struct flex_array *fa) · 45 unmodified lines | ||
| 46 | 46 | * flex_array_alloc - allocate a new flexible array |
| 47 | 47 | * @element_size: the size of individual elements in the array |
| 48 | 48 | * @total: total number of elements that this should hold |
| 49 | + * @flags: page allocation flags to use for base array | |
| 49 | 50 | * |
| 50 | 51 | * Note: all locking must be provided by the caller. |
| 51 | 52 | * |
| @@ -111,6 +112,7 @@ static int fa_element_to_part_nr(struct flex_array *fa, · 59 unmodified lines | ||
| 111 | 112 | |
| 112 | 113 | /** |
| 113 | 114 | * flex_array_free_parts - just free the second-level pages |
| 115 | + * @fa: the flex array from which to free parts | |
| 114 | 116 | * |
| 115 | 117 | * This is to be used in cases where the base 'struct flex_array' |
| 116 | 118 | * has been statically allocated and should not be free. |
| @@ -159,9 +161,12 @@ __fa_get_part(struct flex_array *fa, int part_nr, gfp_t flags) · 42 unmodified lines | ||
| 159 | 161 | |
| 160 | 162 | /** |
| 161 | 163 | * flex_array_put - copy data into the array at @element_nr |
| 162 | − * @src: address of data to copy into the array | |
| 164 | + * @fa: the flex array to copy data into | |
| 163 | 165 | * @element_nr: index of the position in which to insert |
| 164 | 166 | * the new element. |
| 167 | + * @src: address of data to copy into the array | |
| 168 | + * @flags: page allocation flags to use for array expansion | |
| 169 | + * | |
| 165 | 170 | * |
| 166 | 171 | * Note that this *copies* the contents of @src into |
| 167 | 172 | * the array. If you are trying to store an array of |
| @@ -192,6 +197,7 @@ int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src, · 24 unmodified lines | ||
| 192 | 197 | |
| 193 | 198 | /** |
| 194 | 199 | * flex_array_clear - clear element in array at @element_nr |
| 200 | + * @fa: the flex array of the element. | |
| 195 | 201 | * @element_nr: index of the position to clear. |
| 196 | 202 | * |
| 197 | 203 | * Locking must be provided by the caller. |
| @@ -218,8 +224,10 @@ int flex_array_clear(struct flex_array *fa, unsigned int element_nr) · 20 unmodified lines | ||
| 218 | 224 | |
| 219 | 225 | /** |
| 220 | 226 | * flex_array_prealloc - guarantee that array space exists |
| 227 | + * @fa: the flex array for which to preallocate parts | |
| 221 | 228 | * @start: index of first array element for which space is allocated |
| 222 | 229 | * @end: index of last (inclusive) element for which space is allocated |
| 230 | + * @flags: page allocation flags | |
| 223 | 231 | * |
| 224 | 232 | * This will guarantee that no future calls to flex_array_put() |
| 225 | 233 | * will allocate memory. It can be used if you are expecting to |
| @@ -252,6 +260,7 @@ int flex_array_prealloc(struct flex_array *fa, unsigned int start, · 26 unmodified lines | ||
| 252 | 260 | |
| 253 | 261 | /** |
| 254 | 262 | * flex_array_get - pull data back out of the array |
| 263 | + * @fa: the flex array from which to extract data | |
| 255 | 264 | * @element_nr: index of the element to fetch from the array |
| 256 | 265 | * |
| 257 | 266 | * Returns a pointer to the data at index @element_nr. Note |
| @@ -289,6 +298,7 @@ static int part_is_free(struct flex_array_part *part) · 31 unmodified lines | ||
| 289 | 298 | |
| 290 | 299 | /** |
| 291 | 300 | * flex_array_shrink - free unused second-level pages |
| 301 | + * @fa: the flex array to shrink | |
| 292 | 302 | * |
| 293 | 303 | * Frees all second-level pages that consist solely of unused |
| 294 | 304 | * elements. Returns the number of pages freed. |