[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240902025727.2298958-1-ruanjinjie@huawei.com>
Date: Mon, 2 Sep 2024 10:57:27 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: <tglx@...utronix.de>, <linux-kernel@...r.kernel.org>
CC: <ruanjinjie@...wei.com>
Subject: [PATCH -next] genirq/timings: Use time_after_eq() macro
Use time_after_eq() macro instead of directly handling it.
Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
---
kernel/irq/timings.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/timings.c b/kernel/irq/timings.c
index 69f103b4c7a6..a96c0f1346fd 100644
--- a/kernel/irq/timings.c
+++ b/kernel/irq/timings.c
@@ -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)) {
irqs->count = irqs->last_ts = 0;
return U64_MAX;
}
--
2.34.1
Powered by blists - more mailing lists