]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: stmmac: remove .get_tx_len()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 27 Feb 2026 09:53:29 +0000 (09:53 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2026 02:35:05 +0000 (18:35 -0800)
No code calls stmmac_get_tx_len(). Remove this macro, its associated
function pointer, and all implementations.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vvuXJ-0000000Avmx-1B8Y@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
drivers/net/ethernet/stmicro/stmmac/enh_desc.c
drivers/net/ethernet/stmicro/stmmac/hwif.h
drivers/net/ethernet/stmicro/stmmac/norm_desc.c

index 56a88b71def92e6be53a438f99d93517d1b9344f..1bbf02504dad26b9abda5bf39909a26197ae5a1d 100644 (file)
@@ -171,11 +171,6 @@ static int dwmac4_wrback_get_rx_status(struct stmmac_extra_stats *x,
        return ret;
 }
 
-static int dwmac4_rd_get_tx_len(struct dma_desc *p)
-{
-       return (le32_to_cpu(p->des2) & TDES2_BUFFER1_SIZE_MASK);
-}
-
 static void dwmac4_set_tx_owner(struct dma_desc *p)
 {
        p->des3 |= cpu_to_le32(TDES3_OWN);
@@ -540,7 +535,6 @@ static void dwmac4_set_tbs(struct dma_edesc *p, u32 sec, u32 nsec)
 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,
        .set_tx_owner = dwmac4_set_tx_owner,
        .set_rx_owner = dwmac4_set_rx_owner,
        .get_rx_vlan_tci = dwmac4_wrback_get_rx_vlan_tci,
index f5deceb052d7f1e92fe91b6780f203b8746a7226..1009ef436a1e689c26b111c034bf2056bbe1238c 100644 (file)
@@ -40,11 +40,6 @@ static int dwxgmac2_get_rx_status(struct stmmac_extra_stats *x,
        return good_frame;
 }
 
-static int dwxgmac2_get_tx_len(struct dma_desc *p)
-{
-       return (le32_to_cpu(p->des2) & XGMAC_TDES2_B1L);
-}
-
 static void dwxgmac2_set_tx_owner(struct dma_desc *p)
 {
        p->des3 |= cpu_to_le32(XGMAC_TDES3_OWN);
@@ -345,7 +340,6 @@ static void dwxgmac2_set_tbs(struct dma_edesc *p, u32 sec, u32 nsec)
 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,
        .set_tx_owner = dwxgmac2_set_tx_owner,
        .set_rx_owner = dwxgmac2_set_rx_owner,
        .get_rx_vlan_tci = dwxgmac2_wrback_get_rx_vlan_tci,
index 3c241c5699eddaf4b7f000485e8ef83d3e41d24d..ead468f4b6453bd01ace1e3f3f751652f0bc31ad 100644 (file)
@@ -76,11 +76,6 @@ static int enh_desc_get_tx_status(struct stmmac_extra_stats *x,
        return ret;
 }
 
-static int enh_desc_get_tx_len(struct dma_desc *p)
-{
-       return (le32_to_cpu(p->des1) & ETDES1_BUFFER1_SIZE_MASK);
-}
-
 static int enh_desc_coe_rdes0(int ipc_err, int type, int payload_err)
 {
        int ret = good_frame;
@@ -435,7 +430,6 @@ static void enh_desc_clear(struct dma_desc *p)
 const struct stmmac_desc_ops enh_desc_ops = {
        .tx_status = enh_desc_get_tx_status,
        .rx_status = enh_desc_get_rx_status,
-       .get_tx_len = enh_desc_get_tx_len,
        .init_rx_desc = enh_desc_init_rx_desc,
        .init_tx_desc = enh_desc_init_tx_desc,
        .release_tx_desc = enh_desc_release_tx_desc,
index e317f64a0fcc6f12039d093c2cd6ab472220fb7d..374f326efa013a0810a3909e7a258f1450e4ea79 100644 (file)
@@ -63,8 +63,6 @@ struct stmmac_desc_ops {
        /* Return the transmit status looking at the TDES1 */
        int (*tx_status)(struct stmmac_extra_stats *x,
                         struct dma_desc *p, void __iomem *ioaddr);
-       /* Get the buffer size from the descriptor */
-       int (*get_tx_len)(struct dma_desc *p);
        /* Handle extra events on specific interrupts hw dependent */
        void (*set_rx_owner)(struct dma_desc *p, int disable_rx_ic);
        /* Get the receive frame size */
@@ -123,8 +121,6 @@ struct stmmac_desc_ops {
        stmmac_do_callback(__priv, desc, get_rx_vlan_valid, __args)
 #define stmmac_tx_status(__priv, __args...) \
        stmmac_do_callback(__priv, desc, tx_status, __args)
-#define stmmac_get_tx_len(__priv, __args...) \
-       stmmac_do_callback(__priv, desc, get_tx_len, __args)
 #define stmmac_set_rx_owner(__priv, __args...) \
        stmmac_do_void_callback(__priv, desc, set_rx_owner, __args)
 #define stmmac_get_rx_frame_len(__priv, __args...) \
index 621bc1deb4e55421f0810b30f872f419bd103f82..7c3a818c33c16bd4ef8a8e12ea9e1c7b8d885a89 100644 (file)
@@ -55,11 +55,6 @@ static int ndesc_get_tx_status(struct stmmac_extra_stats *x,
        return ret;
 }
 
-static int ndesc_get_tx_len(struct dma_desc *p)
-{
-       return (le32_to_cpu(p->des1) & RDES1_BUFFER1_SIZE_MASK);
-}
-
 /* This function verifies if each incoming frame has some errors
  * and, if required, updates the multicast statistics.
  * In case of success, it returns good_frame because the GMAC device
@@ -281,7 +276,6 @@ static void ndesc_clear(struct dma_desc *p)
 const struct stmmac_desc_ops ndesc_ops = {
        .tx_status = ndesc_get_tx_status,
        .rx_status = ndesc_get_rx_status,
-       .get_tx_len = ndesc_get_tx_len,
        .init_rx_desc = ndesc_init_rx_desc,
        .init_tx_desc = ndesc_init_tx_desc,
        .release_tx_desc = ndesc_release_tx_desc,