From: Anil Belur <askb23@gmail.com>
To: shalinmehta85@gmail.com, dan.carpenter@oracle.com,
daeseok.youn@gmail.com, gregkh@linuxfoundation.org
Cc: speakup@braille.uwo.ca, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, Anil Belur <askb23@gmail.com>
Subject: [PATCH 1/1] staging: speakup: main.c - use time_after()
Date: Tue, 1 Jul 2014 12:30:22 +0530 [thread overview]
Message-ID: <1404198022-19083-1-git-send-email-askb23@gmail.com> (raw)
From: Anil Belur <askb23@gmail.com>
- this patch fixes jiffies comparision with a safer function to prevent
any overflows
Signed-off-by: Anil Belur <askb23@gmail.com>
---
drivers/staging/speakup/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 7de79d5..0cd3cdb 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -2067,7 +2067,7 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym,
if (up_flag)
goto out;
if (last_keycode == keycode &&
- last_spk_jiffy + MAX_DELAY > jiffies) {
+ time_after(last_spk_jiffy + MAX_DELAY, jiffies)) {
spk_close_press = 1;
offset = spk_shift_table[shift_info + 32];
/* double press? */
--
1.9.1
next reply other threads:[~2014-07-01 7:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 7:00 Anil Belur [this message]
2014-07-08 23:51 ` [PATCH 1/1] staging: speakup: main.c - use time_after() Greg KH
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=1404198022-19083-1-git-send-email-askb23@gmail.com \
--to=askb23@gmail.com \
--cc=daeseok.youn@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shalinmehta85@gmail.com \
--cc=speakup@braille.uwo.ca \
/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