The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] gdm72xx: use time_before()
@ 2014-05-25 13:08 Manuel Schölling
  2014-05-25 18:14 ` [PATCH] staging: " Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Manuel Schölling @ 2014-05-25 13:08 UTC (permalink / raw)
  To: gregkh
  Cc: peter.p.waskiewicz.jr, kristina.martsenko, khoroshilov, arnd,
	devel, linux-kernel, kernel-janitors, Manuel Schölling

To be future-proof and for better readability the time comparisons are
modified to use time_before() instead of plain, error-prone math.

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
---
 drivers/staging/gdm72xx/gdm_usb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gdm72xx/gdm_usb.c b/drivers/staging/gdm72xx/gdm_usb.c
index 20539d8..9ddf8f5 100644
--- a/drivers/staging/gdm72xx/gdm_usb.c
+++ b/drivers/staging/gdm72xx/gdm_usb.c
@@ -730,7 +730,7 @@ static int k_mode_thread(void *arg)
 			spin_unlock_irqrestore(&k_lock, flags2);
 
 			expire = jiffies + K_WAIT_TIME;
-			while (jiffies < expire)
+			while (time_before(jiffies, expire))
 				schedule_timeout(K_WAIT_TIME);
 
 			spin_lock_irqsave(&rx->lock, flags);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-25 18:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-25 13:08 [PATCH] gdm72xx: use time_before() Manuel Schölling
2014-05-25 18:14 ` [PATCH] staging: " Greg KH
2014-05-25 18:24   ` Manuel Schoelling
2014-05-25 18:33     ` Greg KH
2014-05-25 18:43       ` Manuel Schoelling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox