aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>2010-01-06 12:50:29 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-07 20:27:30 -0500
commit6837e895cbfd5ce8a717f112e927d2815f341e54 (patch)
tree925159f6681e60ed9b4da8e02df0dd49e8f2ff01 /drivers
parent530e557ab268de154609f3cce2f2390e7b195af3 (diff)
ixgbe: Fix compiler warning about variable being used uninitialized
tc is still throwing a warning that is could be used uninitialized. This fixes it, and properly formats the device ID checks for the use of this variable. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 1a2ea621e371..2ad754c864cf 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -262,10 +262,12 @@ static inline bool ixgbe_tx_is_paused(struct ixgbe_adapter *adapter,
262 int reg_idx = tx_ring->reg_idx; 262 int reg_idx = tx_ring->reg_idx;
263 int dcb_i = adapter->ring_feature[RING_F_DCB].indices; 263 int dcb_i = adapter->ring_feature[RING_F_DCB].indices;
264 264
265 if (adapter->hw.mac.type == ixgbe_mac_82598EB) { 265 switch (adapter->hw.mac.type) {
266 case ixgbe_mac_82598EB:
266 tc = reg_idx >> 2; 267 tc = reg_idx >> 2;
267 txoff = IXGBE_TFCS_TXOFF0; 268 txoff = IXGBE_TFCS_TXOFF0;
268 } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) { 269 break;
270 case ixgbe_mac_82599EB:
269 tc = 0; 271 tc = 0;
270 txoff = IXGBE_TFCS_TXOFF; 272 txoff = IXGBE_TFCS_TXOFF;
271 if (dcb_i == 8) { 273 if (dcb_i == 8) {
@@ -284,6 +286,9 @@ static inline bool ixgbe_tx_is_paused(struct ixgbe_adapter *adapter,
284 tc += (reg_idx - 96) >> 4; 286 tc += (reg_idx - 96) >> 4;
285 } 287 }
286 } 288 }
289 break;
290 default:
291 tc = 0;
287 } 292 }
288 txoff <<= tc; 293 txoff <<= tc;
289 } 294 }