[Intel-gfx] [PATCH] Covert to use time_before macro
Zehao Zhang
zhangzehao at vivo.com
Thu Jul 6 06:46:41 UTC 2023
Use time_before macro instead of open it for readability.
Signed-off-by: Zehao Zhang <zhangzehao at vivo.com>
---
drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c b/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c
index 86b5a9ba323d..9145f9e22860 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c
@@ -57,7 +57,7 @@ static bool pool_free_older_than(struct intel_gt_buffer_pool *pool, long keep)
node = list_entry(pos, typeof(*node), link);
age = READ_ONCE(node->age);
- if (!age || jiffies - age < keep)
+ if (!age || time_before(jiffies, age + keep))
break;
/* Check we are the first to claim this node */
--
2.35.3
More information about the Intel-gfx
mailing list