From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]>
Use of time_before() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read. Signed-off-by: Marcelo Feitoza Parisi <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- hp100.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: quilt/drivers/net/hp100.c =================================================================== --- quilt.orig/drivers/net/hp100.c +++ quilt/drivers/net/hp100.c @@ -116,6 +116,7 @@ #include <linux/delay.h> #include <linux/init.h> #include <linux/bitops.h> +#include <linux/jiffies.h> #include <asm/io.h> @@ -1500,7 +1501,7 @@ static int hp100_start_xmit_bm(struct sk printk(KERN_DEBUG "hp100: %s: start_xmit_bm: No TX PDL available.\n", dev->name); #endif /* not waited long enough since last tx? */ - if (jiffies - dev->trans_start < HZ) + if (time_before(jiffies, dev->trans_start + HZ)) return -EAGAIN; if (hp100_check_lan(dev)) @@ -1653,7 +1654,7 @@ static int hp100_start_xmit(struct sk_bu printk(KERN_DEBUG "hp100: %s: start_xmit: tx free mem = 0x%x\n", dev->name, i); #endif /* not waited long enough since last failed tx try? */ - if (jiffies - dev->trans_start < HZ) { + if (time_before(jiffies, dev->trans_start + HZ)) { #ifdef HP100_DEBUG printk(KERN_DEBUG "hp100: %s: trans_start timing problem\n", dev->name); -- - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html