* [KJ] [PATCH] drivers/net/tokenring/olympic.c : Use of time_after
@ 2005-07-11 19:37 Marcelo Feitoza Parisi
2005-07-16 7:19 ` [KJ] [PATCH] drivers/net/tokenring/olympic.c : Use of the Marcelo Feitoza Parisi
0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Feitoza Parisi @ 2005-07-11 19:37 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: olympic.patch --]
[-- Type: text/x-patch, Size: 765 bytes --]
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 <marcelo@feitoza.com.br>
--- linux/drivers/net/tokenring/olympic.c 2005-07-07 19:13:16.000000000 -0300
+++ linux-kj/drivers/net/tokenring/olympic.c 2005-07-07 23:04:01.113742968 -0300
@@ -100,6 +100,7 @@
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <linux/bitops.h>
+#include <linux/jiffies.h>
#include <net/checksum.h>
@@ -312,7 +313,7 @@
t=jiffies;
while((readl(olympic_mmio+BCTL)) & BCTL_SOFTRESET) {
schedule();
- if(jiffies-t > 40*HZ) {
+ if(time_after(jiffies, t + 40*HZ)) {
printk(KERN_ERR "IBM PCI tokenring card not responding.\n");
return -ENODEV;
}
[-- 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] 2+ messages in thread* [KJ] [PATCH] drivers/net/tokenring/olympic.c : Use of the
2005-07-11 19:37 [KJ] [PATCH] drivers/net/tokenring/olympic.c : Use of time_after Marcelo Feitoza Parisi
@ 2005-07-16 7:19 ` Marcelo Feitoza Parisi
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Feitoza Parisi @ 2005-07-16 7:19 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: olympic.patch --]
[-- Type: text/x-patch, Size: 1174 bytes --]
Use of the 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/olympic.c 2005-07-13 17:53:30.000000000 -0300
+++ linux-kj/drivers/net/tokenring/olympic.c 2005-07-16 01:02:47.940921408 -0300
@@ -365,7 +365,7 @@
t=jiffies;
while (!readl(olympic_mmio+CLKCTL) & CLKCTL_PAUSE) {
schedule() ;
- if(jiffies-t > 2*HZ) {
+ if(time_after(jiffies, t + 2*HZ)) {
printk(KERN_ERR "IBM Cardbus tokenring adapter not responsing.\n") ;
return -ENODEV;
}
@@ -379,7 +379,7 @@
t=jiffies;
while(!((readl(olympic_mmio+SISR_RR)) & SISR_SRB_REPLY)) {
schedule();
- if(jiffies-t > 15*HZ) {
+ if(time_after(jiffies, t + 15*HZ)) {
printk(KERN_ERR "IBM PCI tokenring card not responding.\n");
return -ENODEV;
}
@@ -525,7 +525,7 @@
olympic_priv->srb_queued=0;
break;
}
- if ((jiffies-t) > 10*HZ) {
+ if (time_after(jiffies, t + 10*HZ)) {
printk(KERN_WARNING "%s: SRB timed out. \n",dev->name) ;
olympic_priv->srb_queued=0;
break ;
[-- 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] 2+ messages in thread
end of thread, other threads:[~2005-07-16 7:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-11 19:37 [KJ] [PATCH] drivers/net/tokenring/olympic.c : Use of time_after Marcelo Feitoza Parisi
2005-07-16 7:19 ` [KJ] [PATCH] drivers/net/tokenring/olympic.c : Use of the 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.