Skip to content

Commit fc0d8d9

Browse files
rientjestorvalds
authored andcommitted
flex_array: add missing kerneldoc annotations
Add kerneldoc annotations for function formals of type struct flex_array and gfp_t which are currently lacking. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 45b588d commit fc0d8d9

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎lib/flex_array.c‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static inline int elements_fit_in_base(struct flex_array *fa)
4646
* flex_array_alloc - allocate a new flexible array
4747
* @element_size: the size of individual elements in the array
4848
* @total: total number of elements that this should hold
49+
* @flags: page allocation flags to use for base array
4950
*
5051
* Note: all locking must be provided by the caller.
5152
*
@@ -111,6 +112,7 @@ static int fa_element_to_part_nr(struct flex_array *fa,
111112

112113
/**
113114
* flex_array_free_parts - just free the second-level pages
115+
* @fa: the flex array from which to free parts
114116
*
115117
* This is to be used in cases where the base 'struct flex_array'
116118
* 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)
159161

160162
/**
161163
* 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
163165
* @element_nr: index of the position in which to insert
164166
* the new element.
167+
* @src: address of data to copy into the array
168+
* @flags: page allocation flags to use for array expansion
169+
*
165170
*
166171
* Note that this *copies* the contents of @src into
167172
* 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,
192197

193198
/**
194199
* flex_array_clear - clear element in array at @element_nr
200+
* @fa: the flex array of the element.
195201
* @element_nr: index of the position to clear.
196202
*
197203
* Locking must be provided by the caller.
@@ -218,8 +224,10 @@ int flex_array_clear(struct flex_array *fa, unsigned int element_nr)
218224

219225
/**
220226
* flex_array_prealloc - guarantee that array space exists
227+
* @fa: the flex array for which to preallocate parts
221228
* @start: index of first array element for which space is allocated
222229
* @end: index of last (inclusive) element for which space is allocated
230+
* @flags: page allocation flags
223231
*
224232
* This will guarantee that no future calls to flex_array_put()
225233
* 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,
252260

253261
/**
254262
* flex_array_get - pull data back out of the array
263+
* @fa: the flex array from which to extract data
255264
* @element_nr: index of the element to fetch from the array
256265
*
257266
* 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)
289298

290299
/**
291300
* flex_array_shrink - free unused second-level pages
301+
* @fa: the flex array to shrink
292302
*
293303
* Frees all second-level pages that consist solely of unused
294304
* elements. Returns the number of pages freed.

0 commit comments

Comments
 (0)