[PATCH] ns83820: use time_after_eq macro From: Marcelo Feitoza Parisi It deals with wrapping correctly and is nicer to read. Signed-off-by: Marcelo Feitoza Parisi Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/net/ns83820.c =================================================================== --- linux-kj.orig/drivers/net/ns83820.c 2005-10-11 18:37:26.000000000 +0400 +++ linux-kj/drivers/net/ns83820.c 2005-10-11 18:37:57.000000000 +0400 @@ -116,6 +116,7 @@ #include #include #include +#include #include #include @@ -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; }