drivers/net/tokenring/olympic.c : Use of time_after
Subsystems (2)
PATCH 1/1 drivers/net/tokenring/olympic.c : Use of time_after
Use of the time_after_eq() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.
Signed-off-by Marcelo Feitoza Parisi <[email protected]>
drivers/net/tokenring/olympic.c +2 -1
@@ -100,6 +100,7 @@#include <linux/pci.h> #include <linux/spinlock.h> #include <linux/bitops.h> +#include <linux/jiffies.h> #include <net/checksum.h>
@@ -312,7 +313,7 @@ t=jiffies;while ((readl (olympic_mmio+BCTL )) &BCTL_SOFTRESET ) {schedule (); -if (jiffies-t >40 *HZ ) { +if (time_after (jiffies, t +40 *HZ )) {printk (KERN_ERR "IBM PCI tokenring card not responding.\n" );return -ENODEV ; }
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
PATCH 1/1 drivers/net/tokenring/olympic.c : Use of the
Use of the time_after() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.
Signed-off-by Marcelo Feitoza Parisi <[email protected]>
drivers/net/tokenring/olympic.c +3 -3
@@ -365,7 +365,7 @@ t=jiffies;while (!readl (olympic_mmio+CLKCTL ) &CLKCTL_PAUSE ) {schedule () ; -if (jiffies-t >2 *HZ ) { +if (time_after (jiffies, t +2 *HZ )) {printk (KERN_ERR "IBM Cardbus tokenring adapter not responsing.\n" ) ;return -ENODEV ; }
@@ -379,7 +379,7 @@ t=jiffies;while (!((readl (olympic_mmio+SISR_RR )) &SISR_SRB_REPLY )) {schedule (); -if (jiffies-t >15 *HZ ) { +if (time_after (jiffies, t +15 *HZ )) {printk (KERN_ERR "IBM PCI tokenring card not responding.\n" );return -ENODEV ; }
@@ -525,7 +525,7 @@ olympic_priv->srb_queued=0 ;break ; } -if ((jiffies-t) >10 *HZ ) { +if (time_after (jiffies, t +10 *HZ )) {printk (KERN_WARNING "%s: SRB timed out. \n" ,dev->name) ; olympic_priv->srb_queued=0 ;break ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors