Skip to content

Commit

Permalink
ixgbe: Typecase '1' for 64 bit shift
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nelson, Shannon authored and David S. Miller committed May 7, 2009
1 parent bf069c9 commit c9c7d2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}

/**
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c9c7d2e

Please sign in to comment.