Skip to contentSkip to conversation

ixgbe: move tc variable to CONFIG_IXGBE_DCB

PATCH In review Jaswinder Singh Rajput 3 participants 5 messages Nov 20, 2009

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

PATCH 1/1 ixgbe: move tc variable to CONFIG_IXGBE_DCB

tc is required by CONFIG_IXGBE_DCB.
This also fixes compilation warning:

drivers/net/ixgbe/ixgbe_main.c: In function ‘ixgbe_tx_is_paused’:
drivers/net/ixgbe/ixgbe_main.c:245: warning: unused variable ‘tc’

---
 drivers/net/ixgbe/ixgbe_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +1 -1
index ebcec30..61a02ce 100644
@@ -242,11 +242,11 @@ 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)
 {
-	int tc;
 	u32 txoff = IXGBE_TFCS_TXOFF;
 
 #ifdef CONFIG_IXGBE_DCB
 	if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
+		int tc;
 		int reg_idx = tx_ring->reg_idx;
 		int dcb_i = adapter->ring_feature[RING_F_DCB].indices;
 
Signature · 1 line
1.6.5.3
#1 lore raw
Quoted 33 lines · Jaswinder Singh Rajput

tc is required by CONFIG_IXGBE_DCB.
This also fixes compilation warning:

 drivers/net/ixgbe/ixgbe_main.c: In function ‘ixgbe_tx_is_paused’:
 drivers/net/ixgbe/ixgbe_main.c:245: warning: unused variable ‘tc’

---
 drivers/net/ixgbe/ixgbe_main.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +1 -2
index ebcec30..61a02ce 100644
@@ -242,11 +242,11 @@ 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)
  {
-       int tc;
        u32 txoff = IXGBE_TFCS_TXOFF;
 
  #ifdef CONFIG_IXGBE_DCB
        if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
+               int tc;
                int reg_idx = tx_ring->reg_idx;
                int dcb_i = adapter->ring_feature[RING_F_DCB].indices;
 
--

1.6.5.3

Quoted 1 line

--

I just submitted a patch to fix this. So NAK.

Signature · 2 lines
Cheers,
Jeff
maintainer
#2 lore raw

From: Jeff Kirsher <[email protected]>
Date: Fri, 20 Nov 2009 06:24:21 -0800

Quoted 10 lines
Quoted 8 lines · Jaswinder Singh Rajput

tc is required by CONFIG_IXGBE_DCB.
This also fixes compilation warning:

 drivers/net/ixgbe/ixgbe_main.c: In function ‘ixgbe_tx_is_paused’:
 drivers/net/ixgbe/ixgbe_main.c:245: warning: unused variable ‘tc’

...

Quoted 1 line

I just submitted a patch to fix this. So NAK.

But his is much cleaner that your's, less ifdefs. I think we should therefore use Jasdinder's version.

Acked-by
#3 lore raw
Quoted 12 lines · David Miller

From: Jeff Kirsher <[email protected]>
Date: Fri, 20 Nov 2009 06:24:21 -0800

Quoted 9 lines
Quoted 7 lines · Jaswinder Singh Rajput

tc is required by CONFIG_IXGBE_DCB.
This also fixes compilation warning:

 drivers/net/ixgbe/ixgbe_main.c: In function ‘ixgbe_tx_is_paused’:
 drivers/net/ixgbe/ixgbe_main.c:245: warning: unused variable ‘tc’

Quoted 8 lines
Quoted 1 line
Quoted 1 line

 ...

Quoted 1 line

I just submitted a patch to fix this.  So NAK.

But his is much cleaner that your's, less ifdefs.  I think we should therefore use Jasdinder's version.

:) That is fine. The end result is the same.

Signature · 2 lines
Cheers,
Jeff