kunit: fix kernel-doc warnings in doc. build
PATCH 1/1 kunit: fix kernel-doc warnings in doc. build
Fix documentation build warnings in <kunit/test.h>:
../include/kunit/test.h:616: warning: Function parameter or member 'flags' not described in 'kunit_kmalloc_array' ../include/kunit/test.h:616: warning: Excess function parameter 'gfp' description in 'kunit_kmalloc_array' ../include/kunit/test.h:661: warning: Function parameter or member 'flags' not described in 'kunit_kcalloc' ../include/kunit/test.h:661: warning: Excess function parameter 'gfp' description in 'kunit_kcalloc'
--- include/kunit/test.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/kunit/test.h +2 -2
@@ -607,7 +607,7 @@ void kunit_remove_resource(struct kunit* @test: The test context object. * @n: number of elements. * @size: The size in bytes of the desired memory. -* @gfp: flags passed to underlying kmalloc(). +* @flags: gfp flags passed to underlying kmalloc(). * * Just like `kmalloc_array(...)`, except the allocation is managed by the test case * and is automatically cleaned up after the test case concludes. See &struct
@@ -653,7 +653,7 @@ static inline void *kunit_kzalloc(struct* @test: The test context object. * @n: number of elements. * @size: The size in bytes of the desired memory. -* @gfp: flags passed to underlying kmalloc(). +* @flags: gfp flags passed to underlying kmalloc(). * * See kcalloc() and kunit_kmalloc_array() for more information. */
Quoted 23 lines · Randy Dunlap
Fix documentation build warnings in <
kunit/test.h>:
../include/kunit/test.h:616: warning: Function parameter or member 'flags' not described in 'kunit_kmalloc_array'../include/kunit/test.h:616: warning: Excess function parameter 'gfp' description in 'kunit_kmalloc_array'../include/kunit/test.h:661: warning: Function parameter or member 'flags' not described in 'kunit_kcalloc'../include/kunit/test.h:661: warning: Excess function parameter 'gfp' description in 'kunit_kcalloc'Fixes 0a756853586c ("kunit: test: add test resource management API")Fixes 7122debb4367 ("kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers")Signed-off-by Randy Dunlap <[email protected]>Cc Brendan Higgins <[email protected]>Cc Daniel Latypov <[email protected]>Cc Shuah Khan <[email protected]>--- include/kunit/test.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/kunit/test.h void kunit_remove_resource(struct kunit · line 610
Quoted 5 lines
include/kunit/test.h +1
-1@@ -607,7 +607,7 @@ void kunit_remove_resource(struct kunit* @test: The test context object. * @n: number of elements. * @size: The size in bytes of the desired memory. -* @gfp: flags passed to underlying kmalloc(). +* @flags: gfp flags passed to underlying kmalloc().
Thanks for catching this.
But can we instead rename the parameters?
I can send out a patch for that if you'd prefer.
The other funcs here use gfp_t gfp, which is why this copy-pasted comment does too.
In test.c, kmalloc_array() actually calls the parameter gfp as well.
Quoted 12 lines
include/kunit/test.h +1
-1* * Just like `kmalloc_array(...)`, except the allocation is managed by the test case * and is automatically cleaned up after the test case concludes. See &struct @@ -653,7 +653,7 @@ static inline void *kunit_kzalloc(struct* @test: The test context object. * @n: number of elements. * @size: The size in bytes of the desired memory. -* @gfp: flags passed to underlying kmalloc(). +* @flags: gfp flags passed to underlying kmalloc(). * * See kcalloc() and kunit_kmalloc_array() for more information. */
Quoted 34 lines · Daniel Latypov
Quoted 23 lines · Randy Dunlap
Fix documentation build warnings in <
kunit/test.h>:
../include/kunit/test.h:616: warning: Function parameter or member 'flags' not described in 'kunit_kmalloc_array'../include/kunit/test.h:616: warning: Excess function parameter 'gfp' description in 'kunit_kmalloc_array'../include/kunit/test.h:661: warning: Function parameter or member 'flags' not described in 'kunit_kcalloc'../include/kunit/test.h:661: warning: Excess function parameter 'gfp' description in 'kunit_kcalloc'Fixes 0a756853586c ("kunit: test: add test resource management API")Fixes 7122debb4367 ("kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers")Signed-off-by Randy Dunlap <[email protected]>Cc Brendan Higgins <[email protected]>Cc Daniel Latypov <[email protected]>Cc Shuah Khan <[email protected]>--- include/kunit/test.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/kunit/test.h void kunit_remove_resource(struct kunit · line 610
Quoted 5 lines
include/kunit/test.h +1
-1@@ -607,7 +607,7 @@ void kunit_remove_resource(struct kunit* @test: The test context object. * @n: number of elements. * @size: The size in bytes of the desired memory. -* @gfp: flags passed to underlying kmalloc(). +* @flags: gfp flags passed to underlying kmalloc(). Thanks for catching this.
But can we instead rename the parameters?
I can send out a patch for that if you'd prefer.
Quoted 4 lines
The other funcs here use
gfp_t gfp, which is why this copy-pasted comment does too.
Intest.c,kmalloc_array()actually calls the parametergfpas well.
Sure, go ahead with it, please.
Signature · 1 line
~Randy
Quoted 36 lines · Randy Dunlap
Quoted 34 lines · Daniel Latypov
Quoted 23 lines · Randy Dunlap
Fix documentation build warnings in <
kunit/test.h>:
../include/kunit/test.h:616: warning: Function parameter or member 'flags' not described in 'kunit_kmalloc_array'../include/kunit/test.h:616: warning: Excess function parameter 'gfp' description in 'kunit_kmalloc_array'../include/kunit/test.h:661: warning: Function parameter or member 'flags' not described in 'kunit_kcalloc'../include/kunit/test.h:661: warning: Excess function parameter 'gfp' description in 'kunit_kcalloc'Fixes 0a756853586c ("kunit: test: add test resource management API")Fixes 7122debb4367 ("kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers")Signed-off-by Randy Dunlap <[email protected]>Cc Brendan Higgins <[email protected]>Cc Daniel Latypov <[email protected]>Cc Shuah Khan <[email protected]>--- include/kunit/test.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/kunit/test.h void kunit_remove_resource(struct kunit · line 610
Quoted 5 lines
include/kunit/test.h +1
-1@@ -607,7 +607,7 @@ void kunit_remove_resource(struct kunit* @test: The test context object. * @n: number of elements. * @size: The size in bytes of the desired memory. -* @gfp: flags passed to underlying kmalloc(). +* @flags: gfp flags passed to underlying kmalloc(). Thanks for catching this.
But can we instead rename the parameters?
I can send out a patch for that if you'd prefer.
Quoted 6 lines
Quoted 4 lines
The other funcs here use
gfp_t gfp, which is why this copy-pasted comment does too.
Intest.c,kmalloc_array()actually calls the parametergfpas well.Sure, go ahead with it, please.
https://lore.kernel.org/linux-kselftest/[email protected]
Ran make htmldocs and I don't see any references to kunit in the stdout or stderr, so I assume we're good now.
Quoted 3 lines
--
~Randy