* [PATCH v2] selftests/breakpoints:Add return value in main function
@ 2024-07-10 2:16 Zhu Jun
2024-07-10 15:47 ` Shuah Khan
0 siblings, 1 reply; 2+ messages in thread
From: Zhu Jun @ 2024-07-10 2:16 UTC (permalink / raw)
To: shuah; +Cc: zhujun2, angquan21, linux-kselftest, linux-kernel
Main function return value is int type, so add return
value in the end that this problem was discovered by reading the code
Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
Changes in v2:
- modify commit info
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
index dfec31fb9b30..b473131fce3e 100644
--- a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
+++ b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
@@ -166,7 +166,7 @@ int main(int argc, char **argv)
bool succeeded = true;
unsigned int tests = 0;
cpu_set_t available_cpus;
- int err;
+ int err = 0;
int cpu;
ksft_print_header();
@@ -222,4 +222,6 @@ int main(int argc, char **argv)
ksft_exit_pass();
else
ksft_exit_fail();
+
+ return err;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] selftests/breakpoints:Add return value in main function
2024-07-10 2:16 [PATCH v2] selftests/breakpoints:Add return value in main function Zhu Jun
@ 2024-07-10 15:47 ` Shuah Khan
0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2024-07-10 15:47 UTC (permalink / raw)
To: Zhu Jun, shuah; +Cc: angquan21, linux-kselftest, linux-kernel, Shuah Khan
On 7/9/24 20:16, Zhu Jun wrote:
> Main function return value is int type, so add return
> value in the end that this problem was discovered by reading the code
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
> ---
> Changes in v2:
> - modify commit info
>
> tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
> index dfec31fb9b30..b473131fce3e 100644
> --- a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
> +++ b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
> @@ -166,7 +166,7 @@ int main(int argc, char **argv)
> bool succeeded = true;
> unsigned int tests = 0;
> cpu_set_t available_cpus;
> - int err;
> + int err = 0;
> int cpu;
>
> ksft_print_header();
> @@ -222,4 +222,6 @@ int main(int argc, char **argv)
> ksft_exit_pass();
> else
> ksft_exit_fail();
> +
> + return err;
> }
Unless this is causing a compile error or warning - there is
no need to make this change.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-10 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10 2:16 [PATCH v2] selftests/breakpoints:Add return value in main function Zhu Jun
2024-07-10 15:47 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox