kunit: test.h: solve kernel-doc warnings
There are some warnings there: ./include/kunit/test.h:90: warning: Function parameter or member 'name' not described in 'kunit_resource' ./include/kunit/test.h:353: warning: Function parameter or member 'res' not described in 'kunit_add_resource' ./include/kunit/test.h:367: warning: Function parameter or member 'res' not described in 'kunit_add_named_resource' ./include/kunit/test.h:367: warning: Function parameter or member 'name' not described in 'kunit_add_named_resource' ./include/kunit/test.h:367: warning: Function parameter or member 'data' not described in 'kunit_add_named_resource' ./include/kunit/test.h:367: warning: Excess function parameter 'name_data' description in 'kunit_add_named_resource' Address them, ensuring that all non-private arguments will be properly described. With that regards, at struct kunit_resource, the free argument is described as user-provided. So, this doesn't seem to belong to the "private" part of the struct. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
5b874af627
commit
38d9b909f9
@ -25,6 +25,7 @@ typedef void (*kunit_resource_free_t)(struct kunit_resource *);
|
||||
/**
|
||||
* struct kunit_resource - represents a *test managed resource*
|
||||
* @data: for the user to store arbitrary data.
|
||||
* @name: optional name
|
||||
* @free: a user supplied function to free the resource. Populated by
|
||||
* kunit_resource_alloc().
|
||||
*
|
||||
@ -80,10 +81,10 @@ typedef void (*kunit_resource_free_t)(struct kunit_resource *);
|
||||
*/
|
||||
struct kunit_resource {
|
||||
void *data;
|
||||
const char *name; /* optional name */
|
||||
const char *name;
|
||||
kunit_resource_free_t free;
|
||||
|
||||
/* private: internal use only. */
|
||||
kunit_resource_free_t free;
|
||||
struct kref refcount;
|
||||
struct list_head node;
|
||||
};
|
||||
@ -348,6 +349,7 @@ static inline void kunit_put_resource(struct kunit_resource *res)
|
||||
* none is supplied, the resource data value is simply set to @data.
|
||||
* If an init function is supplied, @data is passed to it instead.
|
||||
* @free: a user-supplied function to free the resource (if needed).
|
||||
* @res: The resource.
|
||||
* @data: value to pass to init function or set in resource data field.
|
||||
*/
|
||||
int kunit_add_resource(struct kunit *test,
|
||||
@ -361,7 +363,9 @@ int kunit_add_resource(struct kunit *test,
|
||||
* @test: The test context object.
|
||||
* @init: a user-supplied function to initialize the resource data, if needed.
|
||||
* @free: a user-supplied function to free the resource data, if needed.
|
||||
* @name_data: name and data to be set for resource.
|
||||
* @res: The resource.
|
||||
* @name: name to be set for resource.
|
||||
* @data: value to pass to init function or set in resource data field.
|
||||
*/
|
||||
int kunit_add_named_resource(struct kunit *test,
|
||||
kunit_resource_init_t init,
|
||||
|
Loading…
Reference in New Issue
Block a user