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 --- linux/drivers/net/hamradio/baycom_epp.c 2005-06-17 16:48:29.000000000 -0300 +++ linux-kj/drivers/net/hamradio/baycom_epp.c 2005-07-08 15:06:06.436246240 -0300 @@ -54,6 +54,7 @@ #include #include #include +#include #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) /* prototypes for ax25_encapsulate and ax25_rebuild_header */ #include @@ -287,7 +288,7 @@ * measure the interrupt frequency */ bc->debug_vals.cur_intcnt++; - if ((cur_jiffies - bc->debug_vals.last_jiffies) >= HZ) { + if (time_after_eq(cur_jiffies, bc->debug_vals.last_jiffies + HZ)) { bc->debug_vals.last_jiffies = cur_jiffies; bc->debug_vals.last_intcnt = bc->debug_vals.cur_intcnt; bc->debug_vals.cur_intcnt = 0; --- linux/drivers/net/hamradio/baycom_par.c 2005-06-17 16:48:29.000000000 -0300 +++ linux-kj/drivers/net/hamradio/baycom_par.c 2005-07-07 20:48:48.960977640 -0300 @@ -84,6 +84,7 @@ #include #include #include +#include #include #include @@ -165,7 +166,7 @@ * measure the interrupt frequency */ bc->debug_vals.cur_intcnt++; - if ((cur_jiffies - bc->debug_vals.last_jiffies) >= HZ) { + if (time_after_eq(cur_jiffies, bc->debug_vals.last_jiffies + HZ)) { bc->debug_vals.last_jiffies = cur_jiffies; bc->debug_vals.last_intcnt = bc->debug_vals.cur_intcnt; bc->debug_vals.cur_intcnt = 0; --- linux/drivers/net/hamradio/baycom_ser_fdx.c 2005-06-17 16:48:29.000000000 -0300 +++ linux-kj/drivers/net/hamradio/baycom_ser_fdx.c 2005-07-07 22:54:03.806547464 -0300 @@ -79,6 +79,7 @@ #include #include #include +#include /* --------------------------------------------------------------------- */ @@ -159,7 +160,7 @@ * measure the interrupt frequency */ bc->debug_vals.cur_intcnt++; - if ((cur_jiffies - bc->debug_vals.last_jiffies) >= HZ) { + if (time_after_eq(cur_jiffies, bc->debug_vals.last_jiffies + HZ)) { bc->debug_vals.last_jiffies = cur_jiffies; bc->debug_vals.last_intcnt = bc->debug_vals.cur_intcnt; bc->debug_vals.cur_intcnt = 0; --- linux/drivers/net/hamradio/baycom_ser_hdx.c 2005-06-17 16:48:29.000000000 -0300 +++ linux-kj/drivers/net/hamradio/baycom_ser_hdx.c 2005-07-07 22:55:17.942277120 -0300 @@ -69,6 +69,7 @@ #include #include #include +#include /* --------------------------------------------------------------------- */ @@ -150,7 +151,7 @@ * measure the interrupt frequency */ bc->debug_vals.cur_intcnt++; - if ((cur_jiffies - bc->debug_vals.last_jiffies) >= HZ) { + if (time_after_eq(cur_jiffies, bc->debug_vals.last_jiffies + HZ)) { bc->debug_vals.last_jiffies = cur_jiffies; bc->debug_vals.last_intcnt = bc->debug_vals.cur_intcnt; bc->debug_vals.cur_intcnt = 0;