From: Auke Kok <auke-jan.h.kok@intel.com>
To: pcnet32@verizon.net
Cc: netdev@vger.kernel.org
Subject: [PATCH] pcnet: fix sparse triviality
Date: Fri, 26 Oct 2007 15:11:32 -0700 [thread overview]
Message-ID: <20071026221132.1913.24518.stgit@localhost.localdomain> (raw)
Since data can never exceed u32, it can't even be larger than LONG_MAX/HZ.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: pcnet32@verizon.net
---
drivers/net/pcnet32.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index ff92aca..3573e77 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1101,9 +1101,8 @@ static int pcnet32_phys_id(struct net_device *dev, u32 data)
mod_timer(&lp->blink_timer, jiffies);
set_current_state(TASK_INTERRUPTIBLE);
- /* AV: the limit here makes no sense whatsoever */
- if ((!data) || (data > (u32) (MAX_SCHEDULE_TIMEOUT / HZ)))
- data = (u32) (MAX_SCHEDULE_TIMEOUT / HZ);
+ if (!data)
+ data = INT_MAX;
msleep_interruptible(data * 1000);
del_timer_sync(&lp->blink_timer);
next reply other threads:[~2007-10-26 22:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 22:11 Auke Kok [this message]
2007-10-29 10:04 ` [PATCH] pcnet: fix sparse triviality Jeff Garzik
2007-10-29 17:54 ` Kok, Auke
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=20071026221132.1913.24518.stgit@localhost.localdomain \
--to=auke-jan.h.kok@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pcnet32@verizon.net \
/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;
as well as URLs for NNTP newsgroup(s).