From: Anna-Maria Behnsen <anna-maria@linutronix.de>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] timers/tick_sched: combine WARN_ON_ONCE and print_once
Date: Mon, 01 Jul 2024 13:31:43 +0200 [thread overview]
Message-ID: <87r0cdpcv4.fsf@somnus> (raw)
In-Reply-To: <20240610103552.25252-1-anna-maria@linutronix.de>
Gentle ping :)
And please replace print_once by printk_once in subject line when
reading.
Anna-Maria Behnsen <anna-maria@linutronix.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@linutronix.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));
> }
>
> /*
next prev parent reply other threads:[~2024-07-01 11:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 10:35 [PATCH] timers/tick_sched: combine WARN_ON_ONCE and print_once Anna-Maria Behnsen
2024-07-01 11:31 ` Anna-Maria Behnsen [this message]
2024-07-01 21:57 ` Frederic Weisbecker
2024-07-03 19:36 ` [tip: timers/core] tick/sched: Combine " tip-bot2 for Anna-Maria Behnsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0cdpcv4.fsf@somnus \
--to=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.