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.
Unified · Split
| @@ -613,7 +613,7 @@ void kunit_remove_resource(struct kunit *test, struct kunit_resource *res); · 612 unmodified lines | ||
| 613 | 613 | * and is automatically cleaned up after the test case concludes. See &struct |
| 614 | 614 | * kunit_resource for more information. |
| 615 | 615 | */ |
| 616 | −void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t flags); | |
| 616 | +void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t gfp); | |
| 617 | 617 | |
| 618 | 618 | /** |
| 619 | 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 | 658 | * See kcalloc() and kunit_kmalloc_array() for more information. |
| 659 | 659 | */ |
| 660 | −static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp_t flags) | |
| 660 | +static 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 | |
| 665 | 665 | void kunit_cleanup(struct kunit *test); |