[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230706072924.2562-1-zhangzehao@vivo.com>
Date: Thu, 6 Jul 2023 15:29:24 +0800
From: Zehao Zhang <zhangzehao@...o.com>
To: jani.nikula@...ux.intel.com, joonas.lahtinen@...ux.intel.com,
rodrigo.vivi@...el.com, tvrtko.ursulin@...ux.intel.com,
airlied@...il.com, daniel@...ll.ch, zhangzehao@...o.com,
luciano.coelho@...el.com
Cc: intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2] drm/i915/gt: Convert to use time_before macro
Use time_before macro instead of open it for readability.
Signed-off-by: Zehao Zhang <zhangzehao@...o.com>
---
v2:
-update subject
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
Powered by blists - more mailing lists