Skip to contentSkip to conversation

drivers/net/wan/farsync.c : Use of the time_before()

PATCH New Marcelo Feitoza Parisi 1 participant 1 message Jul 16, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/net/wan/farsync.c : Use of the time_before()

Use of the time_before() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.

drivers/net/wan/farsync.c +3 -2
@@ -23,6 +23,7 @@
 #include <linux/init.h>
 #include <linux/if.h>
 #include <linux/hdlc.h>
+#include <linux/jiffies.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
@@ -697,14 +698,14 @@
 		 * 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);
 

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors