* [KJ] [PATCH] drivers/net/wireless/strip.c : Use of time_after()
@ 2005-04-13 15:52 Marcelo Feitoza Parisi
0 siblings, 0 replies; only message in thread
From: Marcelo Feitoza Parisi @ 2005-04-13 15:52 UTC (permalink / raw)
To: kernel-janitors
Use of time_after() macro, defined at linux/jiffies.h, which deal with
wrapping correctly and are nicer to read.
--
Marcelo Feitoza Parisi
marcelo at feitoza.com.br
http://marcelo.feitoza.com.br/
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
--- linux/drivers/net/wireless/strip.c 2005-04-07 22:25:57.000000000 -0300
+++ development/drivers/net/wireless/strip.c 2005-04-09 22:17:52.000000000 -0300
@@ -112,7 +112,7 @@ static const char StripVersion[] = "1.3A
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/time.h>
-
+#include <linux/jiffies.h>
/************************************************************************/
/* Useful structures and definitions */
@@ -1576,7 +1576,7 @@ static int strip_xmit(struct sk_buff *sk
del_timer(&strip_info->idle_timer);
- if (jiffies - strip_info->pps_timer > HZ) {
+ if (time_after(jiffies, strip_info->pps_timer + HZ)) {
unsigned long t = jiffies - strip_info->pps_timer;
unsigned long rx_pps_count = (strip_info->rx_pps_count * HZ * 8 + t / 2) / t;
unsigned long tx_pps_count = (strip_info->tx_pps_count * HZ * 8 + t / 2) / t;
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-13 15:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-13 15:52 [KJ] [PATCH] drivers/net/wireless/strip.c : Use of time_after() Marcelo Feitoza Parisi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.