From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
Shannon Nelson <shannon.nelson@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 PATCH 5/5] ixgbe: Typecase '1' for 64 bit shift
Date: Thu, 07 May 2009 13:40:15 -0700 [thread overview]
Message-ID: <20090507204015.19886.92292.stgit@localhost.localdomain> (raw)
In-Reply-To: <20090507203854.19886.54737.stgit@localhost.localdomain>
From: Nelson, Shannon <shannon.nelson@intel.com>
Make sure we don't get any sign-extend issues when we shift a 1
into bit 31.
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 4a316e9..efb175b 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1307,7 +1307,7 @@ static inline void map_vector_to_rxq(struct ixgbe_adapter *a, int v_idx,
set_bit(r_idx, q_vector->rxr_idx);
q_vector->rxr_count++;
- a->rx_ring[r_idx].v_idx = 1 << v_idx;
+ a->rx_ring[r_idx].v_idx = (u64)1 << v_idx;
}
static inline void map_vector_to_txq(struct ixgbe_adapter *a, int v_idx,
@@ -1317,7 +1317,7 @@ static inline void map_vector_to_txq(struct ixgbe_adapter *a, int v_idx,
set_bit(t_idx, q_vector->txr_idx);
q_vector->txr_count++;
- a->tx_ring[t_idx].v_idx = 1 << v_idx;
+ a->tx_ring[t_idx].v_idx = (u64)1 << v_idx;
}
/**
@@ -4057,7 +4057,7 @@ static void ixgbe_watchdog(unsigned long data)
int i;
for (i = 0; i < adapter->num_msix_vectors - NON_Q_VECTORS; i++)
- eics |= (1 << i);
+ eics |= ((u64)1 << i);
/* Cause software interrupt to ensure rx rings are cleaned */
switch (hw->mac.type) {
next prev parent reply other threads:[~2009-05-07 20:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 20:38 [net-next-2.6 PATCH 1/5] ixgbe: always set header length in SRRCTL Jeff Kirsher
2009-05-07 20:39 ` [net-next-2.6 PATCH 2/5] ixgbe: set queue0 for srrctl configuration correctly for DCB Jeff Kirsher
2009-05-07 21:56 ` David Miller
2009-05-07 20:39 ` [net-next-2.6 PATCH 3/5] ixgbe: Enable L2 header split in 82599 Jeff Kirsher
2009-05-07 21:56 ` David Miller
2009-05-07 20:39 ` [net-next-2.6 PATCH 4/5] ixgbe: fix failing to log fan failures Jeff Kirsher
2009-05-07 21:56 ` David Miller
2009-05-07 20:40 ` Jeff Kirsher [this message]
2009-05-07 21:56 ` [net-next-2.6 PATCH 5/5] ixgbe: Typecase '1' for 64 bit shift David Miller
2009-05-07 21:55 ` [net-next-2.6 PATCH 1/5] ixgbe: always set header length in SRRCTL David Miller
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=20090507204015.19886.92292.stgit@localhost.localdomain \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=shannon.nelson@intel.com \
/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