* [KJ] [PATCH] drivers/net/tulip/pnic.c : Use of time_after macro
@ 2005-07-08 19:37 Marcelo Feitoza Parisi
0 siblings, 0 replies; only message in thread
From: Marcelo Feitoza Parisi @ 2005-07-08 19:37 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
Use of time_after() macro, defined at linux/jiffies.h, which deal with
wrapping correctly and are nicer to read.
[-- Attachment #2: pnic.patch --]
[-- Type: text/x-patch, Size: 696 bytes --]
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
--- linux/drivers/net/tulip/pnic.c 2005-06-17 16:48:29.000000000 -0300
+++ linux-kj/drivers/net/tulip/pnic.c 2005-07-07 23:06:05.788789480 -0300
@@ -16,6 +16,7 @@
#include <linux/kernel.h>
#include <linux/pci.h>
+#include <linux/jiffies.h>
#include "tulip.h"
@@ -68,7 +69,8 @@
*/
if (tulip_media_cap[dev->if_port] & MediaIsMII)
return;
- if (! tp->nwayset || jiffies - dev->trans_start > 1*HZ) {
+ if (!tp->nwayset ||
+ time_after(jiffies, dev->trans_start + 1*HZ)) {
tp->csr6 = 0x00420000 | (tp->csr6 & 0x0000fdff);
iowrite32(tp->csr6, ioaddr + CSR6);
iowrite32(0x30, ioaddr + CSR12);
[-- Attachment #3: Type: text/plain, Size: 168 bytes --]
_______________________________________________
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 19:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-08 19:37 [KJ] [PATCH] drivers/net/tulip/pnic.c : Use of time_after macro Marcelo Feitoza Parisi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).