Skip to contentSkip to conversation

ixgbe: fix compile warning without DCB

PATCH New Jeff Kirsher 1 participant 1 message Nov 20, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: fix compile warning without DCB

When DCB is disabled, gcc warns about an unused varaible. Fixed by making the variable only available when DCB is enabled.

---

 drivers/net/ixgbe/ixgbe_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +2 -0
index a5036f7..7cc6e93 100644
@@ -240,7 +240,9 @@ static void ixgbe_unmap_and_free_tx_resource(struct ixgbe_adapter *adapter,
 static inline bool ixgbe_tx_is_paused(struct ixgbe_adapter *adapter,
                                       struct ixgbe_ring *tx_ring)
 {
+#ifdef CONFIG_IXGBE_DCB
 	int tc;
+#endif
 	u32 txoff = IXGBE_TFCS_TXOFF;
 
 #ifdef CONFIG_IXGBE_DCB