Skip to contentSkip to conversation

drivers/net: fix build warning in ethernet/sfc/tx.c

PATCH-net Applied Paul Gortmaker 3 participants 3 messages Feb 6, 2014 – Feb 7, 2014

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

Commit ee45fd92c739db5b7950163d91dfe5f016af6d24 ("sfc: Use TX PIO for sufficiently small packets") introduced the following warning:

drivers/net/ethernet/sfc/tx.c: In function 'efx_enqueue_skb':
drivers/net/ethernet/sfc/tx.c:432:1: warning: label 'finish_packet' defined but not used

Stick the label inside the same #ifdef that the code which calls it uses. Note that this is only seen for arch that do not set ARCH_HAS_IOREMAP_WC, such as arm, mips, sparc, ..., as the others enable the write combining code and hence use the label.

Cc Jon Cooper <[email protected]>
Cc Ben Hutchings <[email protected]>
---
 drivers/net/ethernet/sfc/tx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/sfc/tx.c +2 -0
index c49d1fb16965..75d11fa4eb0a 100644
@@ -429,7 +429,9 @@ netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
 	}
 
 	/* Transfer ownership of the skb to the final buffer */
+#ifdef EFX_USE_PIO
 finish_packet:
+#endif
 	buffer->skb = skb;
 	buffer->flags = EFX_TX_BUF_SKB | dma_flags;
 
Signature · 1 line
1.8.5.2
Acked-by
#1 lore raw
Quoted 6 lines · Paul Gortmaker

Commit ee45fd92c739db5b7950163d91dfe5f016af6d24 ("sfc: Use TX PIO for sufficiently small packets") introduced the following warning:

drivers/net/ethernet/sfc/tx.c: In function 'efx_enqueue_skb':
drivers/net/ethernet/sfc/tx.c:432:1: warning: label 'finish_packet' defined but not used

Quoted 8 lines

Stick the label inside the same #ifdef that the code which calls it uses. Note that this is only seen for arch that do not set ARCH_HAS_IOREMAP_WC, such as arm, mips, sparc, ..., as the others enable the write combining code and hence use the label.

Cc Jon Cooper <[email protected]>
Cc Ben Hutchings <[email protected]>
Quoted 19 lines
---
 drivers/net/ethernet/sfc/tx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/sfc/tx.c +2 -0
index c49d1fb16965..75d11fa4eb0a 100644
@@ -429,7 +429,9 @@ netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
 	}
 
 	/* Transfer ownership of the skb to the final buffer */
+#ifdef EFX_USE_PIO
 finish_packet:
+#endif
 	buffer->skb = skb;
 	buffer->flags = EFX_TX_BUF_SKB | dma_flags;
 
maintainer Applied
#2 lore raw
In reply to Paul Gortmaker

From: Paul Gortmaker <[email protected]>
Date: Thu, 6 Feb 2014 11:45:12 -0500

Quoted 6 lines

Commit ee45fd92c739db5b7950163d91dfe5f016af6d24 ("sfc: Use TX PIO for sufficiently small packets") introduced the following warning:

drivers/net/ethernet/sfc/tx.c: In function 'efx_enqueue_skb':
drivers/net/ethernet/sfc/tx.c:432:1: warning: label 'finish_packet' defined but not used

Quoted 8 lines

Stick the label inside the same #ifdef that the code which calls it uses. Note that this is only seen for arch that do not set ARCH_HAS_IOREMAP_WC, such as arm, mips, sparc, ..., as the others enable the write combining code and hence use the label.

Cc Jon Cooper <[email protected]>
Cc Ben Hutchings <[email protected]>

Applied.