[PATCH -next] genirq/timings: Use time_after_eq() macro
From: Jinjie Ruan
Date: Sun Sep 01 2024 - 22:49:22 EST
Use time_after_eq() macro instead of directly handling it.
Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
---
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