Thread (17 messages) 17 messages, 3 authors, 2020-06-30
STALE2161d

[PATCH net-next 14/14] sfc: don't call tx_remove if there isn't one

From: Edward Cree <hidden>
Date: 2020-06-30 12:15:44
Subsystem: networking drivers, sfc network driver, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Edward Cree, Linus Torvalds

EF100 won't have an efx->type->tx_remove method, because there's
 nothing for it to do.  So make the call conditional.

Signed-off-by: Edward Cree <redacted>
---
 drivers/net/ethernet/sfc/nic_common.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sfc/nic_common.h b/drivers/net/ethernet/sfc/nic_common.h
index 197ecac5e005..fd474d9e55e4 100644
--- a/drivers/net/ethernet/sfc/nic_common.h
+++ b/drivers/net/ethernet/sfc/nic_common.h
@@ -163,7 +163,8 @@ static inline void efx_nic_init_tx(struct efx_tx_queue *tx_queue)
 }
 static inline void efx_nic_remove_tx(struct efx_tx_queue *tx_queue)
 {
-	tx_queue->efx->type->tx_remove(tx_queue);
+	if (tx_queue->efx->type->tx_remove)
+		tx_queue->efx->type->tx_remove(tx_queue);
 }
 static inline void efx_nic_push_buffers(struct efx_tx_queue *tx_queue)
 {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help