]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
timer_list: Print offset as signed integer
authorThomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
Wed, 11 Mar 2026 10:15:12 +0000 (11:15 +0100)
committerThomas Gleixner <tglx@kernel.org>
Thu, 12 Mar 2026 11:15:54 +0000 (12:15 +0100)
The offset of a hrtimer base may be negative.

Print those values correctly.

Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260311-hrtimer-cleanups-v1-3-095357392669@linutronix.de
kernel/time/timer_list.c

index e2e14fd1b4663773fbc709cef08507ec4e6bea4c..427d7ddea3afb7a31bd4135b5098d3a36fe9ae7f 100644 (file)
@@ -101,8 +101,8 @@ print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now)
 
        SEQ_printf(m, "  .resolution: %u nsecs\n", hrtimer_resolution);
 #ifdef CONFIG_HIGH_RES_TIMERS
-       SEQ_printf(m, "  .offset:     %Lu nsecs\n",
-                  (unsigned long long) ktime_to_ns(base->offset));
+       SEQ_printf(m, "  .offset:     %Ld nsecs\n",
+                  (long long) base->offset);
 #endif
        SEQ_printf(m,   "active timers:\n");
        print_active_timers(m, base, now + ktime_to_ns(base->offset));