History

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

Commit 7122debb4367 ("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.

Daniel Latypov committed 5 years ago

Commit 361b57d1 parent a8cf9031 file · +3 −3Browse files

Unified · Split

include/kunit/test.h+3−3
@@ -613,7 +613,7 @@ void kunit_remove_resource(struct kunit *test, struct kunit_resource *res); · 612 unmodified lines
613 * and is automatically cleaned up after the test case concludes. See &struct613 * and is automatically cleaned up after the test case concludes. See &struct
614 * kunit_resource for more information.614 * kunit_resource for more information.
615 */615 */
616void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t flags);616void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t gfp);
617 617
618/**618/**
619 * kunit_kmalloc() - Like kmalloc() except the allocation is *test managed*.619 * 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) · 37 unmodified lines
657 *657 *
658 * See kcalloc() and kunit_kmalloc_array() for more information.658 * See kcalloc() and kunit_kmalloc_array() for more information.
659 */659 */
660static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp_t flags)660static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp_t gfp)
661{661{
662 return kunit_kmalloc_array(test, n, size, flags | __GFP_ZERO);662 return kunit_kmalloc_array(test, n, size, gfp | __GFP_ZERO);
663}663}
664 664
665void kunit_cleanup(struct kunit *test);665void kunit_cleanup(struct kunit *test);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t