Skip to contentSkip to conversation

drivers/atm/iphase.c : Use of the time_after() macro

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

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

PATCH 1/1 drivers/atm/iphase.c : Use of the time_after() macro

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

drivers/atm/iphase.c +4 -2
@@ -60,7 +60,8 @@
 #include <asm/uaccess.h>  
 #include <asm/string.h>  
 #include <asm/byteorder.h>  
-#include <linux/vmalloc.h>  
+#include <linux/vmalloc.h> 
+#include <linux/jiffies.h>
 #include "iphase.h"		  
 #include "suni.h"		  
 #define swap(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8))  
@@ -189,7 +190,8 @@
   int ltimeout;
 
   ia_hack_tcq (dev);
-  if(((jiffies - timer)>50)||((dev->ffL.tcq_rd==dev->host_tcq_wr))){      
+  if(time_after(jiffies, timer + 50)
+		  ||((dev->ffL.tcq_rd==dev->host_tcq_wr))){      
      timer = jiffies; 
      i=0;
      while (i < dev->num_tx_desc) {

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