[tip: timers/core] selftests: timers: nsleep-lat: Use NSEC_PER_MSEC define for unreasonable latency
From: tip-bot2 for Thomas Weißschuh (Schneider Electric)
Date: Tue Aug 11 2026 - 12:43:21 EST
The following commit has been merged into the timers/core branch of tip:
Commit-ID: a00f90877dcd4176da3564f5f126547aa3ddfead
Gitweb: https://git.kernel.org/tip/a00f90877dcd4176da3564f5f126547aa3ddfead
Author: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@xxxxxxxxxxxxx>
AuthorDate: Mon, 03 Aug 2026 12:04:45 +02:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Tue, 11 Aug 2026 18:11:21 +02:00
selftests: timers: nsleep-lat: Use NSEC_PER_MSEC define for unreasonable latency
Use the predefined symbol to make the code easier to understand.
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Acked-by: John Stultz <jstultz@xxxxxxxxxx>
Link: https://patch.msgid.link/20260803-auxclock-nanosleep-prep-v2-14-910cbd485390@xxxxxxxxxxxxx
---
tools/testing/selftests/timers/nsleep-lat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/timers/nsleep-lat.c b/tools/testing/selftests/timers/nsleep-lat.c
index d22973c..d46f174 100644
--- a/tools/testing/selftests/timers/nsleep-lat.c
+++ b/tools/testing/selftests/timers/nsleep-lat.c
@@ -27,7 +27,7 @@
#include "clock-helpers.h"
#include "kselftest.h"
-#define UNRESONABLE_LATENCY 40000000 /* 40ms in nanosecs */
+#define UNRESONABLE_LATENCY (40 * NSEC_PER_MSEC)
/* CLOCK_HWSPECIFIC == CLOCK_SGI_CYCLE (Deprecated) */
#define CLOCK_HWSPECIFIC 10