From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]>
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]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- ns83820.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: quilt/drivers/net/ns83820.c =================================================================== --- quilt.orig/drivers/net/ns83820.c +++ quilt/drivers/net/ns83820.c @@ -116,6 +116,7 @@ #include <linux/ethtool.h> #include <linux/timer.h> #include <linux/if_vlan.h> +#include <linux/jiffies.h> #include <asm/io.h> #include <asm/uaccess.h> @@ -1610,7 +1611,7 @@ static void ns83820_run_bist(struct net_ { struct ns83820 *dev = PRIV(ndev); int timed_out = 0; - long start; + unsigned long start; u32 status; int loops = 0; @@ -1628,7 +1629,7 @@ static void ns83820_run_bist(struct net_ break; if (status & fail) break; - if ((jiffies - start) >= HZ) { + if (time_after_eq(jiffies, start + HZ)) { timed_out = 1; break; } -- - 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