[tip: timers/core] selftests: timers: nsleep-lat: Use NSEC_PER_MSEC define for unreasonable latency

tip-bot2 for Thomas Weißschuh (Schneider Electric) posted 1 patch 1 month, 2 weeks ago
tools/testing/selftests/timers/nsleep-lat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[tip: timers/core] selftests: timers: nsleep-lat: Use NSEC_PER_MSEC define for unreasonable latency
Posted by tip-bot2 for Thomas Weißschuh (Schneider Electric) 1 month, 2 weeks ago
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@linutronix.de>
AuthorDate:    Mon, 03 Aug 2026 12:04:45 +02:00
Committer:     Thomas Gleixner <tglx@kernel.org>
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@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Acked-by: John Stultz <jstultz@google.com>
Link: https://patch.msgid.link/20260803-auxclock-nanosleep-prep-v2-14-910cbd485390@linutronix.de
---
 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