Skip to content

Commit 59dbee7

Browse files
anna-marialxKAGA-KOKO
authored andcommitted
tick/sched: Combine WARN_ON_ONCE and print_once
When the WARN_ON_ONCE() triggers, the printk() of the additional information related to the warning will not happen in print level "warn". When reading dmesg with a restriction to level "warn", the information published by the printk_once() will not show up there. Transform WARN_ON_ONCE() and printk_once() into a WARN_ONCE(). Signed-off-by: Anna-Maria Behnsen <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2b83be2 commit 59dbee7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kernel/time/tick-sched.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,10 +1026,10 @@ static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)
10261026
if (expires == KTIME_MAX || ts->next_tick == hrtimer_get_expires(&ts->sched_timer))
10271027
return;
10281028

1029-
WARN_ON_ONCE(1);
1030-
printk_once("basemono: %llu ts->next_tick: %llu dev->next_event: %llu timer->active: %d timer->expires: %llu\n",
1031-
basemono, ts->next_tick, dev->next_event,
1032-
hrtimer_active(&ts->sched_timer), hrtimer_get_expires(&ts->sched_timer));
1029+
WARN_ONCE(1, "basemono: %llu ts->next_tick: %llu dev->next_event: %llu "
1030+
"timer->active: %d timer->expires: %llu\n", basemono, ts->next_tick,
1031+
dev->next_event, hrtimer_active(&ts->sched_timer),
1032+
hrtimer_get_expires(&ts->sched_timer));
10331033
}
10341034

10351035
/*

0 commit comments

Comments
 (0)