Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sfc: Remove more unused functions

efx_ticks_to_usecs(), efx_reconfigure_port(), efx_ptp_get_mode(), and
efx_tx_get_copy_buffer_limited() are unused.
They seem to be partially due to the later splits to Siena, but
some seem unused for longer.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Link: https://patch.msgid.link/20241102151625.39535-5-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dr. David Alan Gilbert and committed by
Jakub Kicinski
d3e80070 5254fdfc

-43
-8
drivers/net/ethernet/sfc/efx.c
··· 418 418 return usecs * 1000 / efx->timer_quantum_ns; 419 419 } 420 420 421 - unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks) 422 - { 423 - /* We must round up when converting ticks to microseconds 424 - * because we round down when converting the other way. 425 - */ 426 - return DIV_ROUND_UP(ticks * efx->timer_quantum_ns, 1000); 427 - } 428 - 429 421 /* Set interrupt moderation parameters */ 430 422 int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs, 431 423 unsigned int rx_usecs, bool rx_adaptive,
-1
drivers/net/ethernet/sfc/efx.h
··· 168 168 169 169 /* Global */ 170 170 unsigned int efx_usecs_to_ticks(struct efx_nic *efx, unsigned int usecs); 171 - unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks); 172 171 int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs, 173 172 unsigned int rx_usecs, bool rx_adaptive, 174 173 bool rx_may_override_tx);
-16
drivers/net/ethernet/sfc/efx_common.c
··· 635 635 return rc; 636 636 } 637 637 638 - /* Reinitialise the MAC to pick up new PHY settings, even if the port is 639 - * disabled. 640 - */ 641 - int efx_reconfigure_port(struct efx_nic *efx) 642 - { 643 - int rc; 644 - 645 - EFX_ASSERT_RESET_SERIALISED(efx); 646 - 647 - mutex_lock(&efx->mac_lock); 648 - rc = __efx_reconfigure_port(efx); 649 - mutex_unlock(&efx->mac_lock); 650 - 651 - return rc; 652 - } 653 - 654 638 /************************************************************************** 655 639 * 656 640 * Device reset and suspend
-1
drivers/net/ethernet/sfc/efx_common.h
··· 40 40 void efx_start_monitor(struct efx_nic *efx); 41 41 42 42 int __efx_reconfigure_port(struct efx_nic *efx); 43 - int efx_reconfigure_port(struct efx_nic *efx); 44 43 45 44 #define EFX_ASSERT_RESET_SERIALISED(efx) \ 46 45 do { \
-5
drivers/net/ethernet/sfc/ptp.c
··· 1800 1800 return NETDEV_TX_OK; 1801 1801 } 1802 1802 1803 - int efx_ptp_get_mode(struct efx_nic *efx) 1804 - { 1805 - return efx->ptp_data->mode; 1806 - } 1807 - 1808 1803 int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted, 1809 1804 unsigned int new_mode) 1810 1805 {
-1
drivers/net/ethernet/sfc/ptp.h
··· 26 26 void efx_ptp_get_ts_info(struct efx_nic *efx, 27 27 struct kernel_ethtool_ts_info *ts_info); 28 28 bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb); 29 - int efx_ptp_get_mode(struct efx_nic *efx); 30 29 int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted, 31 30 unsigned int new_mode); 32 31 int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
-8
drivers/net/ethernet/sfc/tx.c
··· 49 49 return (u8 *)page_buf->addr + offset; 50 50 } 51 51 52 - u8 *efx_tx_get_copy_buffer_limited(struct efx_tx_queue *tx_queue, 53 - struct efx_tx_buffer *buffer, size_t len) 54 - { 55 - if (len > EFX_TX_CB_SIZE) 56 - return NULL; 57 - return efx_tx_get_copy_buffer(tx_queue, buffer); 58 - } 59 - 60 52 static void efx_tx_maybe_stop_queue(struct efx_tx_queue *txq1) 61 53 { 62 54 /* We need to consider all queues that the net core sees as one */
-3
drivers/net/ethernet/sfc/tx.h
··· 15 15 unsigned int efx_tx_limit_len(struct efx_tx_queue *tx_queue, 16 16 dma_addr_t dma_addr, unsigned int len); 17 17 18 - u8 *efx_tx_get_copy_buffer_limited(struct efx_tx_queue *tx_queue, 19 - struct efx_tx_buffer *buffer, size_t len); 20 - 21 18 /* What TXQ type will satisfy the checksum offloads required for this skb? */ 22 19 static inline unsigned int efx_tx_csum_type_skb(struct sk_buff *skb) 23 20 {