From: Tapasweni Pathak Date: Sun, 21 Sep 2014 13:52:51 +0000 (+0530) Subject: staging: speakup: remove jiffies comparison using time_after_eq() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=89021ecc8364e727a24b0683a74515c8ddf308db;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: speakup: remove jiffies comparison using time_after_eq() This patch fixes checkpatch.pl warning in files of speakup WARNING : Comparing jiffies is almost always wrong; prefer time_after, time_before and friends Signed-off-by: Tapasweni Pathak Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c index 510ac97b097b..555029036dc2 100644 --- a/drivers/staging/speakup/speakup_decext.c +++ b/drivers/staging/speakup/speakup_decext.c @@ -204,7 +204,7 @@ static void do_catch_up(struct spk_synth *synth) else if (ch <= SPACE) { if (!in_escape && strchr(",.!?;:", last)) spk_serial_out(PROCSPEECH); - if (jiffies >= jiff_max) { + if (time_after_eq(jiffies, jiff_max)) { if (!in_escape) spk_serial_out(PROCSPEECH); spin_lock_irqsave(&speakup_info.spinlock, flags); diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c index 693389e41dda..7c9c432e48d9 100644 --- a/drivers/staging/speakup/speakup_decpc.c +++ b/drivers/staging/speakup/speakup_decpc.c @@ -420,7 +420,7 @@ static void do_catch_up(struct spk_synth *synth) else if (ch <= SPACE) { if (!in_escape && strchr(",.!?;:", last)) dt_sendchar(PROCSPEECH); - if (jiffies >= jiff_max) { + if (time_after_eq(jiffies, jiff_max)) { if (!in_escape) dt_sendchar(PROCSPEECH); spin_lock_irqsave(&speakup_info.spinlock, flags); diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c index 4c47b6d06a9f..f3aa4239dc68 100644 --- a/drivers/staging/speakup/synth.c +++ b/drivers/staging/speakup/synth.c @@ -122,7 +122,7 @@ void spk_do_catch_up(struct spk_synth *synth) schedule_timeout(msecs_to_jiffies(full_time_val)); continue; } - if ((jiffies >= jiff_max) && (ch == SPACE)) { + if (time_after_eq(jiffies, jiff_max) && (ch == SPACE)) { spin_lock_irqsave(&speakup_info.spinlock, flags); jiffy_delta_val = jiffy_delta->u.n.value; delay_time_val = delay_time->u.n.value;