[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V2 10/13] media: stv0299: use time_is_before_jiffies() instead of jiffies judgment
- To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, Michael Turquette <mturquette@xxxxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxx>, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, "Pan, Xinhui" <Xinhui.Pan@xxxxxxx>, Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>, Jiri Kosina <jikos@xxxxxxxxxx>, Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>, Alasdair Kergon <agk@xxxxxxxxxx>, Mike Snitzer <snitzer@xxxxxxxxxx>, dm-devel@xxxxxxxxxx, Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>, Hans Verkuil <hverkuil@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-clk@xxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, amd-gfx@xxxxxxxxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx
- From: Qing Wang <wangqing@xxxxxxxx>
- Date: Thu, 10 Feb 2022 18:30:33 -0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9X2g4kpYY8KJuotznJ81Z41K5vV88bf/Mlcbscv2oJM=; b=AQpOit8RV0dmM4IrGOhQ2YuSs9HQocL14th0vYjUA7DOX0Hg3nm0W2ClzAen1Kz8Q93bS9McBIsz7r/ZM7cq6BH50K2ysnTsjovANmNoJhP6qyJ3DA1Eoy5Q8HRLZN3dsYYB/N5Kd3Az7jZO5aBYgVfmYXvg+mbbccm5+EdAxTMoqXbN5vMMq2SrAvtiN5AWQleyP8rFavs84MhhG43Nr16Wrur2Ia/YM+dkPrIolDJjt139a1kcWMNYEgRXfpCJvhilxa3UAOrYDfNFiCicRRZzYvdBzXT9IDrhZPg9lFB9NerHalLOGoek7l3glUWfN7f/05kCzdh+t0Hm6MnggQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VQbjczXdhaoVW1RrNxUAwUh0RBhMZ07rt6JXYUyE0OqfkutGE7c5UULLs7U+W+3dBnMZtpjkRiZMpNGm3kGAENQSQyppc4WOgd/wqJK3LaXOVEbZ0j62bLNT3uLYoB1isDh275y+rv2xVIABa0vyiS1DmLAQImu8lFEST52INyA5JjgH3UHaOevUiqawfPPGJ2I7Uiq/WIQ3WcOhOTcl4HwQ/P1i1Z04wXE+eABpIwmocyD/aJXGcrYEYsUOxEzVf9z5mQLFtoMQowFdYrrMcrC29uB2vK9zWRUIelEamPc3akRlZXn57FQ8QbXEfY5KJsK88UQ682fzN11s0VciPQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com;
- Cc: Wang Qing <wangqing@xxxxxxxx>
- Delivery-date: Fri, 11 Feb 2022 02:37:06 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Wang Qing <wangqing@xxxxxxxx>
It is better to use time_xxx() directly instead of jiffies judgment
for understanding.
Signed-off-by: Wang Qing <wangqing@xxxxxxxx>
---
drivers/media/dvb-frontends/stv0299.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0299.c
b/drivers/media/dvb-frontends/stv0299.c
index 421395e..867ae04
--- a/drivers/media/dvb-frontends/stv0299.c
+++ b/drivers/media/dvb-frontends/stv0299.c
@@ -183,7 +183,7 @@ static int stv0299_wait_diseqc_fifo (struct stv0299_state*
state, int timeout)
dprintk ("%s\n", __func__);
while (stv0299_readreg(state, 0x0a) & 1) {
- if (jiffies - start > timeout) {
+ if (time_is_before_jiffies(start + timeout)) {
dprintk ("%s: timeout!!\n", __func__);
return -ETIMEDOUT;
}
@@ -200,7 +200,7 @@ static int stv0299_wait_diseqc_idle (struct stv0299_state*
state, int timeout)
dprintk ("%s\n", __func__);
while ((stv0299_readreg(state, 0x0a) & 3) != 2 ) {
- if (jiffies - start > timeout) {
+ if (time_is_before_jiffies(start + timeout)) {
dprintk ("%s: timeout!!\n", __func__);
return -ETIMEDOUT;
}
--
2.7.4
|