linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qing Wang <wangqing@vivo.com>
To: "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
	"Jiri Kosina" <jikos@kernel.org>,
	"Benjamin Tissoires" <benjamin.tissoires@redhat.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Alasdair Kergon" <agk@redhat.com>,
	"Mike Snitzer" <snitzer@redhat.com>,
	dm-devel@redhat.com, "Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	xen-devel@lists.xenproject.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org,
	linux-media@vger.kernel.org
Cc: Wang Qing <wangqing@vivo.com>
Subject: [PATCH V2 5/13] hid: use time_is_after_jiffies() instead of jiffies judgment
Date: Thu, 10 Feb 2022 18:30:28 -0800	[thread overview]
Message-ID: <1644546640-23283-6-git-send-email-wangqing@vivo.com> (raw)
In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com>

From: Wang Qing <wangqing@vivo.com>

It is better to use time_xxx() directly instead of jiffies judgment
for understanding.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c
index 8ccb246..15e1423
--- a/drivers/hid/intel-ish-hid/ipc/ipc.c
+++ b/drivers/hid/intel-ish-hid/ipc/ipc.c
@@ -578,7 +578,7 @@ static void _ish_sync_fw_clock(struct ishtp_device *dev)
 	static unsigned long	prev_sync;
 	uint64_t	usec;
 
-	if (prev_sync && jiffies - prev_sync < 20 * HZ)
+	if (prev_sync && time_is_after_jiffies(prev_sync + 20 * HZ))
 		return;
 
 	prev_sync = jiffies;
-- 
2.7.4


  parent reply	other threads:[~2022-02-11  2:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11  2:30 [PATCH V2 00/13] use time_is_xxx() instead of jiffies judgment Qing Wang
2022-02-11  2:30 ` [PATCH V2 1/13] block: xen: use time_is_before_eq_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 2/13] clk: mvebu: " Qing Wang
2022-02-11  2:30 ` [PATCH V2 3/13] gpu: drm: i915: use time_is_after_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 4/13] gpu: drm: radeon: use time_is_before_jiffies() " Qing Wang
2022-02-11  2:30 ` Qing Wang [this message]
2022-02-11 15:46   ` [PATCH V2 5/13] hid: use time_is_after_jiffies() " srinivas pandruvada
2022-02-11  2:30 ` [PATCH V2 6/13] input: serio: use time_is_before_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 7/13] md: use time_is_before_jiffies(() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 10/13] md: use time_is_before_eq_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 9/13] media: si21xx: use time_is_before_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 10/13] media: stv0299: " Qing Wang
2022-02-11  2:30 ` [PATCH V2 11/13] media: tda8083: use time_is_after_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 12/13] media: wl128x: use time_is_before_jiffies() " Qing Wang
2022-02-11  2:30 ` [PATCH V2 13/13] media: vivid: use time_is_after_jiffies() " Qing Wang
2022-02-12 16:46 ` [PATCH V2 00/13] use time_is_xxx() " Theodore Ts'o
     [not found] ` <AC2AdwCTE8eh*443p3QtSarp.9.1644684463005.Hmail.wangqing@vivo.com.@PFlnZmtnMG42UnZ2SllNSmFAbWl0LmVkdT4=>
2022-02-14  1:41   ` 王擎

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1644546640-23283-6-git-send-email-wangqing@vivo.com \
    --to=wangqing@vivo.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=agk@redhat.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=axboe@kernel.dk \
    --cc=benjamin.tissoires@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dm-devel@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jikos@kernel.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=sboyd@kernel.org \
    --cc=snitzer@redhat.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).