All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gdm72xx: use time_before()
@ 2014-05-25 13:08 ` Manuel Schölling
  0 siblings, 0 replies; 10+ 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

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

Thread overview: 10+ 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 13:08 ` Manuel Schölling
2014-05-25 18:14 ` [PATCH] staging: " Greg KH
2014-05-25 18:14   ` Greg KH
2014-05-25 18:24   ` Manuel Schoelling
2014-05-25 18:24     ` Manuel Schoelling
2014-05-25 18:33     ` Greg KH
2014-05-25 18:33       ` Greg KH
2014-05-25 18:43       ` Manuel Schoelling
2014-05-25 18:43         ` Manuel Schoelling

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.