mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests:timers: globals don't need initialization
@ 2022-07-02  0:08 Zan Aziz
  0 siblings, 0 replies; only message in thread
From: Zan Aziz @ 2022-07-02  0:08 UTC (permalink / raw)
  To: jstultz, tglx, sboyd, shuah; +Cc: Zan Aziz, linux-kselftest, linux-kernel

Global variables do not need to be initialized to 0 and checkpatch
flags this error in tools/testing/selftests/timers/alarmtimer-suspend.c:

ERROR: do not initialise globals to 0
+int final_ret = 0;

Fix this checkpatch error.

Signed-off-by: Zan Aziz <zanaziz313@gmail.com>
---
 tools/testing/selftests/timers/alarmtimer-suspend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/timers/alarmtimer-suspend.c b/tools/testing/selftests/timers/alarmtimer-suspend.c
index 54da4b088f4c..4332b494103d 100644
--- a/tools/testing/selftests/timers/alarmtimer-suspend.c
+++ b/tools/testing/selftests/timers/alarmtimer-suspend.c
@@ -92,7 +92,7 @@ long long timespec_sub(struct timespec a, struct timespec b)
 	return ret;
 }
 
-int final_ret = 0;
+int final_ret;
 
 void sigalarm(int signo)
 {
-- 
2.32.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-02  0:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-02  0:08 [PATCH] selftests:timers: globals don't need initialization Zan Aziz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®