Commit 7f32b10c authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Shuah Khan

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: aac35468 ("kunit: test: create a single centralized executor for all tests")
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Tested-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 3fc48259
...@@ -252,13 +252,14 @@ static inline int kunit_run_all_tests(void) ...@@ -252,13 +252,14 @@ static inline int kunit_run_all_tests(void)
} }
#endif /* IS_BUILTIN(CONFIG_KUNIT) */ #endif /* IS_BUILTIN(CONFIG_KUNIT) */
#ifdef MODULE
/** /**
* kunit_test_suites() - used to register one or more &struct kunit_suite * kunit_test_suites_for_module() - used to register one or more
* with KUnit. * &struct kunit_suite with KUnit.
* *
* @suites_list...: a statically allocated list of &struct kunit_suite. * @__suites: a statically allocated list of &struct kunit_suite.
* *
* Registers @suites_list with the test framework. See &struct kunit_suite for * Registers @__suites with the test framework. See &struct kunit_suite for
* more information. * more information.
* *
* If a test suite is built-in, module_init() gets translated into * If a test suite is built-in, module_init() gets translated into
...@@ -267,7 +268,6 @@ static inline int kunit_run_all_tests(void) ...@@ -267,7 +268,6 @@ static inline int kunit_run_all_tests(void)
* module_{init|exit} functions for the builtin case when registering * module_{init|exit} functions for the builtin case when registering
* suites via kunit_test_suites() below. * suites via kunit_test_suites() below.
*/ */
#ifdef MODULE
#define kunit_test_suites_for_module(__suites) \ #define kunit_test_suites_for_module(__suites) \
static int __init kunit_test_suites_init(void) \ static int __init kunit_test_suites_init(void) \
{ \ { \
...@@ -294,7 +294,7 @@ static inline int kunit_run_all_tests(void) ...@@ -294,7 +294,7 @@ static inline int kunit_run_all_tests(void)
* kunit_test_suites() - used to register one or more &struct kunit_suite * kunit_test_suites() - used to register one or more &struct kunit_suite
* with KUnit. * with KUnit.
* *
* @suites: a statically allocated list of &struct kunit_suite. * @__suites: a statically allocated list of &struct kunit_suite.
* *
* Registers @suites with the test framework. See &struct kunit_suite for * Registers @suites with the test framework. See &struct kunit_suite for
* more information. * more information.
...@@ -308,10 +308,10 @@ static inline int kunit_run_all_tests(void) ...@@ -308,10 +308,10 @@ static inline int kunit_run_all_tests(void)
* module. * module.
* *
*/ */
#define kunit_test_suites(...) \ #define kunit_test_suites(__suites...) \
__kunit_test_suites(__UNIQUE_ID(array), \ __kunit_test_suites(__UNIQUE_ID(array), \
__UNIQUE_ID(suites), \ __UNIQUE_ID(suites), \
__VA_ARGS__) ##__suites)
#define kunit_test_suite(suite) kunit_test_suites(&suite) #define kunit_test_suite(suite) kunit_test_suites(&suite)
......
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