[PATCH net-next 03/14] net: stmmac: remove .get_tx_owner()
From: Russell King (Oracle) <hidden>
Date: 2026-02-27 09:53:35
Also in:
linux-arm-kernel
Subsystem:
networking drivers, stmmac ethernet driver, the rest · Maintainers:
Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds
No code calls stmmac_get_tx_owner(). Remove the macro, its associated function pointer, and all implementations. Signed-off-by: Russell King (Oracle) <redacted> --- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 6 ------ drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c | 6 ------ drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 6 ------ drivers/net/ethernet/stmicro/stmmac/hwif.h | 3 --- drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 6 ------ 5 files changed, 27 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
index e226dc6a1b17..b8fe4ad883e5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c@@ -176,11 +176,6 @@ static int dwmac4_rd_get_tx_len(struct dma_desc *p) return (le32_to_cpu(p->des2) & TDES2_BUFFER1_SIZE_MASK); } -static int dwmac4_get_tx_owner(struct dma_desc *p) -{ - return (le32_to_cpu(p->des3) & TDES3_OWN) >> TDES3_OWN_SHIFT; -} - static void dwmac4_set_tx_owner(struct dma_desc *p) { p->des3 |= cpu_to_le32(TDES3_OWN);
@@ -552,7 +547,6 @@ const struct stmmac_desc_ops dwmac4_desc_ops = { .tx_status = dwmac4_wrback_get_tx_status, .rx_status = dwmac4_wrback_get_rx_status, .get_tx_len = dwmac4_rd_get_tx_len, - .get_tx_owner = dwmac4_get_tx_owner, .set_tx_owner = dwmac4_set_tx_owner, .set_rx_owner = dwmac4_set_rx_owner, .get_tx_ls = dwmac4_get_tx_ls,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
index 41e5b420a215..8bf373513930 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c@@ -45,11 +45,6 @@ static int dwxgmac2_get_tx_len(struct dma_desc *p) return (le32_to_cpu(p->des2) & XGMAC_TDES2_B1L); } -static int dwxgmac2_get_tx_owner(struct dma_desc *p) -{ - return (le32_to_cpu(p->des3) & XGMAC_TDES3_OWN) > 0; -} - static void dwxgmac2_set_tx_owner(struct dma_desc *p) { p->des3 |= cpu_to_le32(XGMAC_TDES3_OWN);
@@ -356,7 +351,6 @@ const struct stmmac_desc_ops dwxgmac210_desc_ops = { .tx_status = dwxgmac2_get_tx_status, .rx_status = dwxgmac2_get_rx_status, .get_tx_len = dwxgmac2_get_tx_len, - .get_tx_owner = dwxgmac2_get_tx_owner, .set_tx_owner = dwxgmac2_set_tx_owner, .set_rx_owner = dwxgmac2_set_rx_owner, .get_tx_ls = dwxgmac2_get_tx_ls,
diff --git a/drivers/net/ethernet/stmicro/stmmac/enh_desc.c b/drivers/net/ethernet/stmicro/stmmac/enh_desc.c
index 8f6993c8bcae..77b2cb34aa0e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/enh_desc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/enh_desc.c@@ -277,11 +277,6 @@ static void enh_desc_init_tx_desc(struct dma_desc *p, int mode, int end) enh_desc_end_tx_desc_on_ring(p, end); } -static int enh_desc_get_tx_owner(struct dma_desc *p) -{ - return (le32_to_cpu(p->des0) & ETDES0_OWN) >> 31; -} - static void enh_desc_set_tx_owner(struct dma_desc *p) { p->des0 |= cpu_to_le32(ETDES0_OWN);
@@ -448,7 +443,6 @@ const struct stmmac_desc_ops enh_desc_ops = { .get_tx_len = enh_desc_get_tx_len, .init_rx_desc = enh_desc_init_rx_desc, .init_tx_desc = enh_desc_init_tx_desc, - .get_tx_owner = enh_desc_get_tx_owner, .release_tx_desc = enh_desc_release_tx_desc, .prepare_tx_desc = enh_desc_prepare_tx_desc, .set_tx_ic = enh_desc_set_tx_ic,
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.h b/drivers/net/ethernet/stmicro/stmmac/hwif.h
index 0db96a387259..50ca8dcea2fd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.h
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.h@@ -51,7 +51,6 @@ struct stmmac_desc_ops { unsigned int tcppayloadlen); /* Set/get the owner of the descriptor */ void (*set_tx_owner)(struct dma_desc *p); - int (*get_tx_owner)(struct dma_desc *p); /* Clean the tx descriptor as soon as the tx irq is received */ void (*release_tx_desc)(struct dma_desc *p, int mode); /* Clear interrupt on tx frame completion. When this bit is
@@ -116,8 +115,6 @@ struct stmmac_desc_ops { stmmac_do_void_callback(__priv, desc, prepare_tso_tx_desc, __args) #define stmmac_set_tx_owner(__priv, __args...) \ stmmac_do_void_callback(__priv, desc, set_tx_owner, __args) -#define stmmac_get_tx_owner(__priv, __args...) \ - stmmac_do_callback(__priv, desc, get_tx_owner, __args) #define stmmac_release_tx_desc(__priv, __args...) \ stmmac_do_void_callback(__priv, desc, release_tx_desc, __args) #define stmmac_set_tx_ic(__priv, __args...) \
diff --git a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
index 859cb9242a52..e9face06b950 100644
--- a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c@@ -141,11 +141,6 @@ static void ndesc_init_tx_desc(struct dma_desc *p, int mode, int end) ndesc_end_tx_desc_on_ring(p, end); } -static int ndesc_get_tx_owner(struct dma_desc *p) -{ - return (le32_to_cpu(p->des0) & TDES0_OWN) >> 31; -} - static void ndesc_set_tx_owner(struct dma_desc *p) { p->des0 |= cpu_to_le32(TDES0_OWN);
@@ -294,7 +289,6 @@ const struct stmmac_desc_ops ndesc_ops = { .get_tx_len = ndesc_get_tx_len, .init_rx_desc = ndesc_init_rx_desc, .init_tx_desc = ndesc_init_tx_desc, - .get_tx_owner = ndesc_get_tx_owner, .release_tx_desc = ndesc_release_tx_desc, .prepare_tx_desc = ndesc_prepare_tx_desc, .set_tx_ic = ndesc_set_tx_ic,
--
2.47.3