Skip to content

Commit a9c91ec

Browse files
nathanchanceshuahkh
authored andcommitted
selftests: membarrier: ksft_exit_pass() does not return
After commit f7d5bcd ("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_pass(), as __noreturn prevents the compiler from warning that a caller of ksft_exit_pass() does not return a value because the program will terminate upon calling these functions. Reviewed-by: Muhammad Usama Anjum <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent e84b354 commit a9c91ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/testing/selftests/membarrier/membarrier_test_multi_thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ int main(int argc, char **argv)
6969
/* Multi-threaded */
7070
test_mt_membarrier();
7171

72-
return ksft_exit_pass();
72+
ksft_exit_pass();
7373
}

tools/testing/selftests/membarrier/membarrier_test_single_thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ int main(int argc, char **argv)
2424

2525
test_membarrier_get_registrations(/*cmd=*/0);
2626

27-
return ksft_exit_pass();
27+
ksft_exit_pass();
2828
}

0 commit comments

Comments
 (0)