[PATCH] drivers/net/ns83820.c: use time_after_eq 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-12-05 13:17:53.000000000 +0300 +++ linux-kj/drivers/net/ns83820.c 2005-12-05 13:19:10.000000000 +0300 @@ -115,6 +115,7 @@ #include #include #include +#include #include #include @@ -1606,7 +1607,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; @@ -1624,7 +1625,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; }