All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] drivers/net/tokenring/lanstreamer.c : Use of
@ 2005-07-08 18:44 Marcelo Feitoza Parisi
  0 siblings, 0 replies; only message in thread
From: Marcelo Feitoza Parisi @ 2005-07-08 18:44 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.

Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>

--- linux/drivers/net/tokenring/lanstreamer.c   2005-07-07
19:13:16.000000000 -0300
+++ linux-kj/drivers/net/tokenring/lanstreamer.c        2005-07-07
23:02:53.839970136 -0300
@@ -123,6 +123,7 @@
 #include <linux/version.h>
 #include <linux/bitops.h>
 #include <linux/wait.h>
+#include <linux/jiffies.h>

 #include <net/checksum.h>

@@ -513,7 +514,7 @@

        while (!((readw(streamer_mmio + SISR)) & SISR_SRB_REPLY)) {
                msleep_interruptible(100);
-               if (jiffies - t > 40 * HZ) {
+               if (time_after(jiffies, t + 40 * HZ)) {
                        printk(KERN_ERR
                               "IBM PCI tokenring card not responding\n");
                        release_region(dev->base_addr, STREAMER_IO_SPACE);
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-08 18:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-08 18:44 [KJ] [PATCH] drivers/net/tokenring/lanstreamer.c : Use of 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.