[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240821092121.16447-1-chenyufan@vivo.com>
Date: Wed, 21 Aug 2024 17:21:21 +0800
From: Chen Yufan <chenyufan@...o.com>
To: Frank Binns <frank.binns@...tec.com>,
Matt Coster <matt.coster@...tec.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com,
Chen Yufan <chenyufan@...o.com>
Subject: [PATCH v1] ImgTec powerVR DRM driver: Convert to use time_before macro
Use time_before instead of direct subtraction for readability.
Signed-off-by: Chen Yufan <chenyufan@...o.com>
---
drivers/gpu/drm/imagination/pvr_ccb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/imagination/pvr_ccb.c b/drivers/gpu/drm/imagination/pvr_ccb.c
index 4deeac7ed..b7d5f9ca3 100644
--- a/drivers/gpu/drm/imagination/pvr_ccb.c
+++ b/drivers/gpu/drm/imagination/pvr_ccb.c
@@ -321,7 +321,7 @@ static int pvr_kccb_reserve_slot_sync(struct pvr_device *pvr_dev)
bool reserved = false;
u32 retries = 0;
- while ((jiffies - start_timestamp) < (u32)RESERVE_SLOT_TIMEOUT ||
+ while (time_before(jiffies, start_timestamp + (u32)RESERVE_SLOT_TIMEOUT) ||
retries < RESERVE_SLOT_MIN_RETRIES) {
reserved = pvr_kccb_try_reserve_slot(pvr_dev);
if (reserved)
--
2.39.0
Powered by blists - more mailing lists