Skip to content

Commit 7f32b10

Browse files
mchehabshuahkh
authored andcommitted
kunit: test: fix remaining kernel-doc warnings
test.h still produce three warnings: include/kunit/test.h:282: warning: Function parameter or member '__suites' not described in 'kunit_test_suites_for_module' include/kunit/test.h:282: warning: Excess function parameter 'suites_list' description in 'kunit_test_suites_for_module' include/kunit/test.h:314: warning: Excess function parameter 'suites' description in 'kunit_test_suites' They're all due to errors at kernel-doc markups. Update them. It should be noticed that this patch moved a kernel-doc markup that were located at the wrong place, and using a wrong name. Kernel-doc only supports kaving the markup just before the function/macro declaration. Placing it elsewhere will make it do wrong assumptions. Fixes: aac3546 ("kunit: test: create a single centralized executor for all tests") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Tested-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 3fc4825 commit 7f32b10

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

include/kunit/test.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,14 @@ static inline int kunit_run_all_tests(void)
252252
}
253253
#endif /* IS_BUILTIN(CONFIG_KUNIT) */
254254

255+
#ifdef MODULE
255256
/**
256-
* kunit_test_suites() - used to register one or more &struct kunit_suite
257-
* with KUnit.
257+
* kunit_test_suites_for_module() - used to register one or more
258+
* &struct kunit_suite with KUnit.
258259
*
259-
* @suites_list...: a statically allocated list of &struct kunit_suite.
260+
* @__suites: a statically allocated list of &struct kunit_suite.
260261
*
261-
* Registers @suites_list with the test framework. See &struct kunit_suite for
262+
* Registers @__suites with the test framework. See &struct kunit_suite for
262263
* more information.
263264
*
264265
* If a test suite is built-in, module_init() gets translated into
@@ -267,7 +268,6 @@ static inline int kunit_run_all_tests(void)
267268
* module_{init|exit} functions for the builtin case when registering
268269
* suites via kunit_test_suites() below.
269270
*/
270-
#ifdef MODULE
271271
#define kunit_test_suites_for_module(__suites) \
272272
static int __init kunit_test_suites_init(void) \
273273
{ \
@@ -294,7 +294,7 @@ static inline int kunit_run_all_tests(void)
294294
* kunit_test_suites() - used to register one or more &struct kunit_suite
295295
* with KUnit.
296296
*
297-
* @suites: a statically allocated list of &struct kunit_suite.
297+
* @__suites: a statically allocated list of &struct kunit_suite.
298298
*
299299
* Registers @suites with the test framework. See &struct kunit_suite for
300300
* more information.
@@ -308,10 +308,10 @@ static inline int kunit_run_all_tests(void)
308308
* module.
309309
*
310310
*/
311-
#define kunit_test_suites(...) \
311+
#define kunit_test_suites(__suites...) \
312312
__kunit_test_suites(__UNIQUE_ID(array), \
313313
__UNIQUE_ID(suites), \
314-
__VA_ARGS__)
314+
##__suites)
315315

316316
#define kunit_test_suite(suite) kunit_test_suites(&suite)
317317

0 commit comments

Comments
 (0)