From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kevin Curtis <kevin.curtis@farsite.co.uk>
Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>
Subject: [patch] farsync: fix support for over 30 cards
Date: Tue, 09 Oct 2012 07:20:48 +0000 [thread overview]
Message-ID: <20121009072047.GB19159@elgon.mountain> (raw)
We're trying to fill a 64 bit bitmap but only the lower 30 shifts work
because the shift wraps around.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static checker stuff. No one actually has over 30 of these cards... :P
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index 1a62318..b627132 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -597,7 +597,7 @@ fst_q_work_item(u64 * queue, int card_index)
* bottom half for the card. Note the limitation of 64 cards.
* That ought to be enough
*/
- mask = 1 << card_index;
+ mask = (u64)1 << card_index;
*queue |= mask;
spin_unlock_irqrestore(&fst_work_q_lock, flags);
}
next reply other threads:[~2012-10-09 7:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 7:20 Dan Carpenter [this message]
2012-10-09 17:55 ` [patch] farsync: fix support for over 30 cards David Miller
2013-07-26 10:13 ` Updated FarSync driver Kevin Curtis
2013-07-26 23:41 ` Dan Carpenter
2013-07-27 20:39 ` govind
2013-07-29 11:10 ` Dan Carpenter
2013-07-29 11:42 ` Dan Carpenter
2013-07-29 12:58 ` Kevin Curtis
2013-07-31 13:55 ` Kevin Curtis
2013-07-31 14:50 ` Dan Carpenter
2013-08-30 20:53 ` Dan Carpenter
2013-08-30 21:05 ` Dan Carpenter
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=20121009072047.GB19159@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=kevin.curtis@farsite.co.uk \
--cc=netdev@vger.kernel.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