summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/mm/ksm_functional_tests.c
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2024-04-24 19:24:07 +0200
committerShuah Khan <skhan@linuxfoundation.org>2024-05-06 21:57:20 +0200
commit69e545edbe8b17c26aa06ef7e430d0be7f08d876 (patch)
treefa58d41b98142387d06d02e1f4a656cb6d6a339c /tools/testing/selftests/mm/ksm_functional_tests.c
parentselftests: membarrier: ksft_exit_pass() does not return (diff)
downloadlinux-69e545edbe8b17c26aa06ef7e430d0be7f08d876.tar.xz
linux-69e545edbe8b17c26aa06ef7e430d0be7f08d876.zip
selftests/mm: ksft_exit functions do not return
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has always been called). To facilitate updating the return type of these functions, remove 'return' before the calls to ksft_exit_...(), as __noreturn prevents the compiler from warning that a caller of the ksft_exit functions does not return a value because the program will terminate upon calling these functions. Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/mm/ksm_functional_tests.c')
-rw-r--r--tools/testing/selftests/mm/ksm_functional_tests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c b/tools/testing/selftests/mm/ksm_functional_tests.c
index d615767e396b..508287560c45 100644
--- a/tools/testing/selftests/mm/ksm_functional_tests.c
+++ b/tools/testing/selftests/mm/ksm_functional_tests.c
@@ -646,5 +646,5 @@ int main(int argc, char **argv)
if (err)
ksft_exit_fail_msg("%d out of %d tests failed\n",
err, ksft_test_num());
- return ksft_exit_pass();
+ ksft_exit_pass();
}