public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] farsync: fix support for over 30 cards
@ 2012-10-09  7:20 Dan Carpenter
  2012-10-09 17:55 ` David Miller
  2013-07-26 10:13 ` Updated FarSync driver Kevin Curtis
  0 siblings, 2 replies; 12+ messages in thread
From: Dan Carpenter @ 2012-10-09  7:20 UTC (permalink / raw)
  To: Kevin Curtis; +Cc: netdev, kernel-janitors, David S. Miller

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);
 }

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

end of thread, other threads:[~2013-08-30 21:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-09  7:20 [patch] farsync: fix support for over 30 cards Dan Carpenter
2012-10-09 17:55 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox