Skip to content

Commit

Permalink
net: chelsio: remove unused function calc_tx_descs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ColinIanKing authored and davem330 committed Mar 8, 2024
1 parent bf02ba6 commit 9b78bbe
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions drivers/net/ethernet/chelsio/cxgb4/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b78bbe

Please sign in to comment.