History

flex_array: add missing kerneldoc annotations

Add kerneldoc annotations for function formals of type struct flex_array and gfp_t which are currently lacking.

David Rientjes committed 17 years ago

Commit fc0d8d91 parent 45b588d1 file · +11 −1Browse files

Unified · Split

lib/flex_array.c+11−1
@@ -46,6 +46,7 @@ static inline int elements_fit_in_base(struct flex_array *fa) · 45 unmodified lines
46 * flex_array_alloc - allocate a new flexible array46 * flex_array_alloc - allocate a new flexible array
47 * @element_size: the size of individual elements in the array47 * @element_size: the size of individual elements in the array
48 * @total: total number of elements that this should hold48 * @total: total number of elements that this should hold
49 * @flags: page allocation flags to use for base array
49 *50 *
50 * Note: all locking must be provided by the caller.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 * flex_array_free_parts - just free the second-level pages114 * flex_array_free_parts - just free the second-level pages
115 * @fa: the flex array from which to free parts
114 *116 *
115 * This is to be used in cases where the base 'struct flex_array'117 * This is to be used in cases where the base 'struct flex_array'
116 * has been statically allocated and should not be free.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 * flex_array_put - copy data into the array at @element_nr163 * flex_array_put - copy data into the array at @element_nr
162 * @src: address of data to copy into the array164 * @fa: the flex array to copy data into
163 * @element_nr: index of the position in which to insert165 * @element_nr: index of the position in which to insert
164 * the new element.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 * Note that this *copies* the contents of @src into171 * Note that this *copies* the contents of @src into
167 * the array. If you are trying to store an array of172 * 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 * flex_array_clear - clear element in array at @element_nr199 * flex_array_clear - clear element in array at @element_nr
200 * @fa: the flex array of the element.
195 * @element_nr: index of the position to clear.201 * @element_nr: index of the position to clear.
196 *202 *
197 * Locking must be provided by the caller.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 * flex_array_prealloc - guarantee that array space exists226 * flex_array_prealloc - guarantee that array space exists
227 * @fa: the flex array for which to preallocate parts
221 * @start: index of first array element for which space is allocated228 * @start: index of first array element for which space is allocated
222 * @end: index of last (inclusive) element for which space is allocated229 * @end: index of last (inclusive) element for which space is allocated
230 * @flags: page allocation flags
223 *231 *
224 * This will guarantee that no future calls to flex_array_put()232 * This will guarantee that no future calls to flex_array_put()
225 * will allocate memory. It can be used if you are expecting to233 * 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 * flex_array_get - pull data back out of the array262 * flex_array_get - pull data back out of the array
263 * @fa: the flex array from which to extract data
255 * @element_nr: index of the element to fetch from the array264 * @element_nr: index of the element to fetch from the array
256 *265 *
257 * Returns a pointer to the data at index @element_nr. Note266 * 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 * flex_array_shrink - free unused second-level pages300 * flex_array_shrink - free unused second-level pages
301 * @fa: the flex array to shrink
292 *302 *
293 * Frees all second-level pages that consist solely of unused303 * Frees all second-level pages that consist solely of unused
294 * elements. Returns the number of pages freed.304 * elements. Returns the number of pages freed.