Netdev List
 help / color / mirror / Atom feed
From: Shani <shani.moideen@wipro.com>
To: philb@gnu.org
Cc: alan@redhat.com, netdev@vger.kernel.org, kernel-janitors@osdl.org
Subject: [KJ] Patch:replace with time_after in drivers/net/eexpress.c
Date: Wed, 28 Mar 2007 10:44:31 +0530	[thread overview]
Message-ID: <1175058871.11584.33.camel@shani-win> (raw)

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

             reply	other threads:[~2007-03-28  5:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-28  5:14 Shani [this message]
2007-03-28  8:46 ` Patch:replace with time_after in drivers/net/eexpress.c Alan Cox
2007-03-29 12:35 ` Jeff Garzik
2007-03-29 18:41 ` [KJ] " Marcin Ślusarz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1175058871.11584.33.camel@shani-win \
    --to=shani.moideen@wipro.com \
    --cc=alan@redhat.com \
    --cc=kernel-janitors@osdl.org \
    --cc=netdev@vger.kernel.org \
    --cc=philb@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox