[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r0cdpcv4.fsf@somnus>
Date: Mon, 01 Jul 2024 13:31:43 +0200
From: Anna-Maria Behnsen <anna-maria@...utronix.de>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>, Thomas
Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] timers/tick_sched: combine WARN_ON_ONCE and print_once
Gentle ping :)
And please replace print_once by printk_once in subject line when
reading.
Anna-Maria Behnsen <anna-maria@...utronix.de> writes:
> 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
> the 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 <anna-maria@...utronix.de>
> ---
> kernel/time/tick-sched.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index 71a792cd8936..afeae34e2a09 100644
> --- a/kernel/time/tick-sched.c
> +++ b/kernel/time/tick-sched.c
> @@ -1026,10 +1026,10 @@ static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)
> if (expires == KTIME_MAX || ts->next_tick == hrtimer_get_expires(&ts->sched_timer))
> return;
>
> - WARN_ON_ONCE(1);
> - printk_once("basemono: %llu ts->next_tick: %llu dev->next_event: %llu timer->active: %d timer->expires: %llu\n",
> - basemono, ts->next_tick, dev->next_event,
> - hrtimer_active(&ts->sched_timer), hrtimer_get_expires(&ts->sched_timer));
> + WARN_ONCE(1, "basemono: %llu ts->next_tick: %llu dev->next_event: %llu "
> + "timer->active: %d timer->expires: %llu\n", basemono, ts->next_tick,
> + dev->next_event, hrtimer_active(&ts->sched_timer),
> + hrtimer_get_expires(&ts->sched_timer));
> }
>
> /*
Powered by blists - more mailing lists