Skip to contentSkip to conversation

drivers/net/wan/sdla_ft1.c : Use of time_after macro

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

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

PATCH 1/1 drivers/net/wan/sdla_ft1.c : Use of time_after macro

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

drivers/net/wan/sdla_ft1.c +2 -1
@@ -29,6 +29,7 @@
 #include <linux/wanrouter.h>	/* WAN router definitions */
 #include <linux/wanpipe.h>	/* WANPIPE common user API definitions */
 #include <linux/if_arp.h>	/* ARPHRD_* defines */
+#include <linux/jiffies.h>	/* time_after() macro */
 
 #include <linux/inetdevice.h>
 #include <asm/uaccess.h>
@@ -164,7 +165,7 @@
 
 		timeout = jiffies;
 		while (mb->return_code != 'I')	/* Wait 1s for board to initialize */
-			if ((jiffies - timeout) > 1*HZ) break;
+			if (time_after(jiffies, timeout + 1*HZ)) break;
 
 		if (mb->return_code != 'I') {
 			printk(KERN_INFO

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