Commit 361b57df authored by Daniel Latypov's avatar Daniel Latypov Committed by Shuah Khan

kunit: fix kernel-doc warnings due to mismatched arg names

Commit 7122debb ("kunit: introduce
kunit_kmalloc_array/kunit_kcalloc() helpers") added new functions but
called last arg `flags`, unlike the existing code that used `gfp`.
This only is an issue in test.h, test.c still used `gfp`.

But the documentation was copy-pasted with the old names, leading to
kernel-doc warnings.

Do s/flags/gfp to make the names consistent and fix the warnings.

Fixes: 7122debb ("kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers")
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarDaniel Latypov <dlatypov@google.com>
Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent a8cf9033
...@@ -613,7 +613,7 @@ void kunit_remove_resource(struct kunit *test, struct kunit_resource *res); ...@@ -613,7 +613,7 @@ void kunit_remove_resource(struct kunit *test, struct kunit_resource *res);
* and is automatically cleaned up after the test case concludes. See &struct * and is automatically cleaned up after the test case concludes. See &struct
* kunit_resource for more information. * kunit_resource for more information.
*/ */
void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t flags); void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t gfp);
/** /**
* kunit_kmalloc() - Like kmalloc() except the allocation is *test managed*. * kunit_kmalloc() - Like kmalloc() except the allocation is *test managed*.
...@@ -657,9 +657,9 @@ static inline void *kunit_kzalloc(struct kunit *test, size_t size, gfp_t gfp) ...@@ -657,9 +657,9 @@ static inline void *kunit_kzalloc(struct kunit *test, size_t size, gfp_t gfp)
* *
* See kcalloc() and kunit_kmalloc_array() for more information. * See kcalloc() and kunit_kmalloc_array() for more information.
*/ */
static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp_t flags) static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp_t gfp)
{ {
return kunit_kmalloc_array(test, n, size, flags | __GFP_ZERO); return kunit_kmalloc_array(test, n, size, gfp | __GFP_ZERO);
} }
void kunit_cleanup(struct kunit *test); void kunit_cleanup(struct kunit *test);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment