[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240701060634.4827-1-zhujun2@cmss.chinamobile.com>
Date: Sun, 30 Jun 2024 23:06:34 -0700
From: Zhu Jun <zhujun2@...s.chinamobile.com>
To: shuah@...nel.org
Cc: zhujun2@...s.chinamobile.com,
angquan21@...il.com,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] selftests/breakpoints:Add return value in main function
Main function return value is int type, so add return
value in the end
Signed-off-by: Zhu Jun <zhujun2@...s.chinamobile.com>
---
.../testing/selftests/breakpoints/step_after_suspend_test.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
index dfec31fb9b30..37a83e3bbe7a 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();
@@ -184,7 +184,7 @@ int main(int argc, char **argv)
}
err = sched_getaffinity(0, sizeof(available_cpus), &available_cpus);
- if (err < 0)
+ if (err < 0)
ksft_exit_fail_msg("sched_getaffinity() failed\n");
for (cpu = 0; cpu < CPU_SETSIZE; cpu++) {
@@ -222,4 +222,6 @@ int main(int argc, char **argv)
ksft_exit_pass();
else
ksft_exit_fail();
+
+ return err;
}
--
2.17.1
Powered by blists - more mailing lists