From: "Pandruvada, Srinivas" <srinivas.pandruvada@intel.com>
To: "jikos@kernel.org" <jikos@kernel.org>,
"benjamin.tissoires@redhat.com" <benjamin.tissoires@redhat.com>,
"liqiong@nfschina.com" <liqiong@nfschina.com>,
"Xu, Even" <even.xu@intel.com>, "Ye, Xiang" <xiang.ye@intel.com>,
"Pandruvada@lists.nfsmail.com" <Pandruvada@lists.nfsmail.com>
Cc: "renyu@nfschina.com" <renyu@nfschina.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"yuzhe@nfschina.com" <yuzhe@nfschina.com>
Subject: Re: [PATCH 1/2] HID: intel-ish-hid: ipc: use time_before to replace "jiffies < a"
Date: Tue, 7 Jun 2022 14:32:45 +0000 [thread overview]
Message-ID: <694cf5fe021898c42b286f18fff71625134ed722.camel@intel.com> (raw)
In-Reply-To: <20220606134750.20736-1-liqiong@nfschina.com>
On Mon, 2022-06-06 at 21:47 +0800, Li Qiong wrote:
> time_before deals with timer wrapping correctly.
>
> Signed-off-by: Li Qiong <liqiong@nfschina.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.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 8ccb246b0114..15e14239af82 100644
> --- 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_before(jiffies, prev_sync + 20 * HZ))
> return;
>
> prev_sync = jiffies;
next prev parent reply other threads:[~2022-06-07 14:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 13:47 Li Qiong
2022-06-07 14:32 ` Pandruvada, Srinivas [this message]
2022-06-08 11:06 ` Jiri Kosina
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=694cf5fe021898c42b286f18fff71625134ed722.camel@intel.com \
--to=srinivas.pandruvada@intel.com \
--cc=Pandruvada@lists.nfsmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=even.xu@intel.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liqiong@nfschina.com \
--cc=renyu@nfschina.com \
--cc=xiang.ye@intel.com \
--cc=yuzhe@nfschina.com \
/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
all inboxes | Powered by JetHome®