]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net: chelsio: remove unused function calc_tx_descs
authorColin Ian King <colin.i.king@gmail.com>
Thu, 7 Mar 2024 11:22:37 +0000 (11:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2024 10:19:35 +0000 (10:19 +0000)
The inlined helper function calc_tx_descs is not used and is redundant.
Remove it.

Cleans up clang scan build warning:
drivers/net/ethernet/chelsio/cxgb4/sge.c:814:28: warning: unused
function 'calc_tx_descs' [-Wunused-function]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/sge.c

index b5ff2e1a9975f3828ec80975f6088b3b2a49bd76..49d5808b7d11d281796debc6be5f9b3a9b1f60e3 100644 (file)
@@ -803,20 +803,6 @@ static inline unsigned int calc_tx_flits(const struct sk_buff *skb,
        return flits;
 }
 
-/**
- *     calc_tx_descs - calculate the number of Tx descriptors for a packet
- *     @skb: the packet
- *     @chip_ver: chip version
- *
- *     Returns the number of Tx descriptors needed for the given Ethernet
- *     packet, including the needed WR and CPL headers.
- */
-static inline unsigned int calc_tx_descs(const struct sk_buff *skb,
-                                        unsigned int chip_ver)
-{
-       return flits_to_desc(calc_tx_flits(skb, chip_ver));
-}
-
 /**
  *     cxgb4_write_sgl - populate a scatter/gather list for a packet
  *     @skb: the packet