All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] Patch:replace with time_after in drivers/net/eexpress.c
@ 2007-03-28  5:26 ` Shani
  0 siblings, 0 replies; 9+ messages in thread
From: Shani @ 2007-03-28  5:14 UTC (permalink / raw)
  To: philb; +Cc: alan, netdev, kernel-janitors

Hi,

Replacing with time_after in drivers/net/eexpress.c
Applies and compiles clean on latest tree.Not tested.

thanks.

Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
----

diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index 3868b80..7825f78 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -115,6 +115,7 @@
 #include <linux/mca-legacy.h>
 #include <linux/spinlock.h>
 #include <linux/bitops.h>
+#include <linux/jiffies.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -556,7 +557,7 @@ static void unstick_cu(struct net_device *dev)
 
 	if (lp->started)
 	{
-		if ((jiffies - dev->trans_start)>50)
+		if (time_after(jiffies, dev->trans_start + 50))
 		{
 			if (lp->tx_link==lp->last_tx_restart)
 			{
@@ -612,7 +613,7 @@ static void unstick_cu(struct net_device *dev)
 	}
 	else
 	{
-		if ((jiffies-lp->init_time)>10)
+		if (time_after(jiffies,lp->init_time + 10))
 		{
 			unsigned short status = scb_status(dev);
 			printk(KERN_WARNING "%s: i82586 startup timed out, status %04x, resetting...\n",
@@ -1650,7 +1651,7 @@ eexp_set_multicast(struct net_device *dev)
 #endif
                 oj = jiffies;
                 while ((SCB_CUstat(scb_status(dev)) == 2) &&
-                       ((jiffies-oj) < 2000));
+                       (time_after(jiffies, oj + 2000)));
 		if (SCB_CUstat(scb_status(dev)) == 2)
 			printk("%s: warning, CU didn't stop\n", dev->name);
                 lp->started &= ~(STARTED_CU);

-- 
Shani Moideen

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [KJ] Patch:replace with time_after in drivers/net/eexpress.c
@ 2007-03-28  5:26 ` Shani
  0 siblings, 0 replies; 9+ messages in thread
From: Shani @ 2007-03-28  5:26 UTC (permalink / raw)
  To: philb; +Cc: alan, netdev, kernel-janitors

Hi,

Replacing with time_after in drivers/net/eexpress.c
Applies and compiles clean on latest tree.Not tested.

thanks.

Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
----

diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index 3868b80..7825f78 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -115,6 +115,7 @@
 #include <linux/mca-legacy.h>
 #include <linux/spinlock.h>
 #include <linux/bitops.h>
+#include <linux/jiffies.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
@@ -556,7 +557,7 @@ static void unstick_cu(struct net_device *dev)
 
 	if (lp->started)
 	{
-		if ((jiffies - dev->trans_start)>50)
+		if (time_after(jiffies, dev->trans_start + 50))
 		{
 			if (lp->tx_link=lp->last_tx_restart)
 			{
@@ -612,7 +613,7 @@ static void unstick_cu(struct net_device *dev)
 	}
 	else
 	{
-		if ((jiffies-lp->init_time)>10)
+		if (time_after(jiffies,lp->init_time + 10))
 		{
 			unsigned short status = scb_status(dev);
 			printk(KERN_WARNING "%s: i82586 startup timed out, status %04x, resetting...\n",
@@ -1650,7 +1651,7 @@ eexp_set_multicast(struct net_device *dev)
 #endif
                 oj = jiffies;
                 while ((SCB_CUstat(scb_status(dev)) = 2) &&
-                       ((jiffies-oj) < 2000));
+                       (time_after(jiffies, oj + 2000)));
 		if (SCB_CUstat(scb_status(dev)) = 2)
 			printk("%s: warning, CU didn't stop\n", dev->name);
                 lp->started &= ~(STARTED_CU);

-- 
Shani Moideen
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [KJ] Patch:replace with time_after in drivers/net/eexpress.c
  2007-03-28  5:26 ` Shani
@ 2007-03-28  8:46   ` Alan Cox
  -1 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2007-03-28  8:46 UTC (permalink / raw)
  To: Shani; +Cc: philb, alan, netdev, kernel-janitors

On Wed, Mar 28, 2007 at 10:44:31AM +0530, Shani wrote:
> Hi,
> 
> Replacing with time_after in drivers/net/eexpress.c
> Applies and compiles clean on latest tree.Not tested.
> 
> thanks.
> 
> Signed-off-by: Shani Moideen <shani.moideen@wipro.com>

NAK as not tested. The existing code is known to work so ugly or not
it is better than untested changes


_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch:replace with time_after in drivers/net/eexpress.c
@ 2007-03-28  8:46   ` Alan Cox
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2007-03-28  8:46 UTC (permalink / raw)
  To: Shani; +Cc: philb, alan, netdev, kernel-janitors

On Wed, Mar 28, 2007 at 10:44:31AM +0530, Shani wrote:
> Hi,
> 
> Replacing with time_after in drivers/net/eexpress.c
> Applies and compiles clean on latest tree.Not tested.
> 
> thanks.
> 
> Signed-off-by: Shani Moideen <shani.moideen@wipro.com>

NAK as not tested. The existing code is known to work so ugly or not
it is better than untested changes



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Patch:replace with time_after in drivers/net/eexpress.c
  2007-03-28  5:26 ` Shani
@ 2007-03-29 12:35   ` Jeff Garzik
  -1 siblings, 0 replies; 9+ messages in thread
From: Jeff Garzik @ 2007-03-29 12:35 UTC (permalink / raw)
  To: Shani; +Cc: philb, alan, netdev, kernel-janitors

Shani wrote:
> Hi,
> 
> Replacing with time_after in drivers/net/eexpress.c
> Applies and compiles clean on latest tree.Not tested.
> 
> thanks.
> 
> Signed-off-by: Shani Moideen <shani.moideen@wipro.com>

applied to #upstream


_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch:replace with time_after in drivers/net/eexpress.c
@ 2007-03-29 12:35   ` Jeff Garzik
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Garzik @ 2007-03-29 12:35 UTC (permalink / raw)
  To: Shani; +Cc: philb, alan, netdev, kernel-janitors

Shani wrote:
> Hi,
> 
> Replacing with time_after in drivers/net/eexpress.c
> Applies and compiles clean on latest tree.Not tested.
> 
> thanks.
> 
> Signed-off-by: Shani Moideen <shani.moideen@wipro.com>

applied to #upstream



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Patch:replace with time_after in drivers/net/eexpress.c
  2007-03-28  5:26 ` Shani
@ 2007-03-29 18:41   ` Marcin Ślusarz
  -1 siblings, 0 replies; 9+ messages in thread
From: Marcin Ślusarz @ 2007-03-29 18:41 UTC (permalink / raw)
  To: Shani; +Cc: philb, alan, netdev, kernel-janitors, jeff

2007/3/28, Shani <shani.moideen@wipro.com>:
> @@ -1650,7 +1651,7 @@ eexp_set_multicast(struct net_device *dev)
>  #endif
>                  oj = jiffies;
>                  while ((SCB_CUstat(scb_status(dev)) = 2) &&
> -                       ((jiffies-oj) < 2000));
> +                       (time_after(jiffies, oj + 2000)));
>                 if (SCB_CUstat(scb_status(dev)) = 2)
>                         printk("%s: warning, CU didn't stop\n", dev->name);
>                  lp->started &= ~(STARTED_CU);
>
it should be time_before, not time_after...
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Patch:replace with time_after in drivers/net/eexpress.c
@ 2007-03-29 18:41   ` Marcin Ślusarz
  0 siblings, 0 replies; 9+ messages in thread
From: Marcin Ślusarz @ 2007-03-29 18:41 UTC (permalink / raw)
  To: Shani; +Cc: philb, alan, netdev, kernel-janitors, jeff

2007/3/28, Shani <shani.moideen@wipro.com>:
> @@ -1650,7 +1651,7 @@ eexp_set_multicast(struct net_device *dev)
>  #endif
>                  oj = jiffies;
>                  while ((SCB_CUstat(scb_status(dev)) == 2) &&
> -                       ((jiffies-oj) < 2000));
> +                       (time_after(jiffies, oj + 2000)));
>                 if (SCB_CUstat(scb_status(dev)) == 2)
>                         printk("%s: warning, CU didn't stop\n", dev->name);
>                  lp->started &= ~(STARTED_CU);
>
it should be time_before, not time_after...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [KJ] Patch:replace with time_after in drivers/net/eexpress.c
  2007-03-28  5:26 ` Shani
                   ` (3 preceding siblings ...)
  (?)
@ 2007-03-30  1:55 ` Cong WANG
  -1 siblings, 0 replies; 9+ messages in thread
From: Cong WANG @ 2007-03-30  1:55 UTC (permalink / raw)
  To: kernel-janitors

2007/3/30, Marcin ¦lusarz :> 2007/3/28, Shani :> > @@ -1650,7 +1651,7 @@ eexp_set_multicast(struct net_device *dev)> >  #endif> >                  oj = jiffies;> >                  while ((SCB_CUstat(scb_status(dev)) = 2) &&> > -                       ((jiffies-oj) < 2000));> > +                       (time_after(jiffies, oj + 2000)));> >                 if (SCB_CUstat(scb_status(dev)) = 2)> >                         printk("%s: warning, CU didn't stop\n", dev->name);> >                  lp->started &= ~(STARTED_CU);> >> it should be time_before, not time_after...
ACK.

-- So Dark The Con Of Man.
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-03-30  1:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-28  5:14 [KJ] Patch:replace with time_after in drivers/net/eexpress.c Shani
2007-03-28  5:26 ` Shani
2007-03-28  8:46 ` Alan Cox
2007-03-28  8:46   ` Alan Cox
2007-03-29 12:35 ` [KJ] " Jeff Garzik
2007-03-29 12:35   ` Jeff Garzik
2007-03-29 18:41 ` [KJ] " Marcin Ślusarz
2007-03-29 18:41   ` Marcin Ślusarz
2007-03-30  1:55 ` Cong WANG

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.