drivers/net/wan/sdla_fr.c : use of time_after macro
Subsystems (2)
PATCH 1/1 drivers/net/wan/sdla_fr.c : use of time_after macro
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/wan/sdla_fr.c +4 -3
@@ -152,6 +152,7 @@#include <asm/io.h> /* for inb(), outb(), etc. */ #include <linux/time.h> /* for do_gettimeofday */ #include <linux/in.h> /* sockaddr_in */ +#include <linux/jiffies.h> /* time_after() macro */ #include <asm/errno.h> #include <linux/ip.h>
@@ -773,7 +774,7 @@for (;;) {if (card->u.f.update_comms_stats ==0 )break ; -if ((jiffies - timeout) > (1 *HZ )){ +if (time_after (jiffies, timeout +1 *HZ )){ card->u.f.update_comms_stats =0 ;return -EAGAIN ; }
@@ -4799,7 +4800,7 @@ {fr_channel_t *chan = dev->priv;volatile sdla_t *card = chan->card; -u32 timeout; +unsigned long timeout;fr508_flags_t * flags = card->flags;int reset_critical=0 ;
@@ -4821,7 +4822,7 @@if (!(card->u.f.timer_int_enabled &TMR_INT_ENABLED_UNCONFIG ))break ; -if ((jiffies - timeout) > (1 *HZ )){ +if (time_after (jiffies, timeout +1 *HZ )){ card->u.f.timer_int_enabled &= ~TMR_INT_ENABLED_UNCONFIG ;printk (KERN_INFO "%s: Failed to delete DLCI %i\n" , card->devname,chan->dlci);
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors