netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wan: time_before()
@ 2014-05-25 17:32 Manuel Schölling
  2014-05-25 17:58 ` Joe Perches
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel Schölling @ 2014-05-25 17:32 UTC (permalink / raw)
  To: kevin.curtis; +Cc: netdev, 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/net/wan/farsync.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index bcfff0d..d007f60 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -697,14 +697,14 @@ fst_cpureset(struct fst_card_info *card)
 		 * We are delaying here to allow the 9054 to reset itself
 		 */
 		j = jiffies + 1;
-		while (jiffies < j)
+		while (time_before(jiffies, j))
 			/* Do nothing */ ;
 		outw(0x240f, card->pci_conf + CNTRL_9054 + 2);
 		/*
 		 * We are delaying here to allow the 9054 to reload its eeprom
 		 */
 		j = jiffies + 1;
-		while (jiffies < j)
+		while (time_before(jiffies, j))
 			/* Do nothing */ ;
 		outw(0x040f, card->pci_conf + CNTRL_9054 + 2);
 
-- 
1.7.10.4

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

end of thread, other threads:[~2014-06-03  0:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-25 17:32 [PATCH] wan: time_before() Manuel Schölling
2014-05-25 17:58 ` Joe Perches
2014-05-26  4:40   ` David Miller
2014-05-28  7:09     ` Kevin Curtis
2014-05-31 15:07       ` [PATCH] wan: Use usleep_range() Manuel Schölling
2014-06-02  8:56         ` Kevin Curtis
2014-06-03  0:01         ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).