From: Marcelo Feitoza Parisi Subject: [KJ] [PATCH] drivers/net/ns83820.c : Use of time_after_eq macro 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 --- 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 #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; }