public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Jinjie Ruan <ruanjinjie@huawei.com>, linux-kernel@vger.kernel.org
Cc: ruanjinjie@huawei.com
Subject: Re: [PATCH -next] genirq/timings: Use time_after_eq() macro
Date: Sun, 08 Sep 2024 16:06:26 +0200	[thread overview]
Message-ID: <87seuack9p.ffs@tglx> (raw)
In-Reply-To: <20240902025727.2298958-1-ruanjinjie@huawei.com>

On Mon, Sep 02 2024 at 10:57, Jinjie Ruan wrote:
> @@ -383,7 +383,7 @@ static u64 __irq_timings_next_event(struct irqt_stat *irqs, int irq, u64 now)
>  {
>  	int index, i, period_max, count, start, min = INT_MAX;
>  
> -	if ((now - irqs->last_ts) >= NSEC_PER_SEC) {
> +	if (time_after_eq(now, irqs->last_ts + NSEC_PER_SEC)) {

time_after_eq() is meant for handling jiffies and not for arbitraty time
stamps which have nothing to do with jiffies at all

Thanks,

        tglx

      reply	other threads:[~2024-09-08 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02  2:57 [PATCH -next] genirq/timings: Use time_after_eq() macro Jinjie Ruan
2024-09-08 14:06 ` Thomas Gleixner [this message]

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=87seuack9p.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ruanjinjie@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox