sfc: Remove more unused functions
authorDr. David Alan Gilbert <linux@treblig.org>
Sat, 2 Nov 2024 15:16:25 +0000 (15:16 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 6 Nov 2024 01:35:11 +0000 (17:35 -0800)
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>
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx.h
drivers/net/ethernet/sfc/efx_common.c
drivers/net/ethernet/sfc/efx_common.h
drivers/net/ethernet/sfc/ptp.c
drivers/net/ethernet/sfc/ptp.h
drivers/net/ethernet/sfc/tx.c
drivers/net/ethernet/sfc/tx.h

index 90bb7db15519d0853b71614d44be2db52d765110..650136dfc642fd9f6b709ac79cff6d418151682c 100644 (file)
@@ -418,14 +418,6 @@ unsigned int efx_usecs_to_ticks(struct efx_nic *efx, unsigned int usecs)
        return usecs * 1000 / efx->timer_quantum_ns;
 }
 
-unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks)
-{
-       /* We must round up when converting ticks to microseconds
-        * because we round down when converting the other way.
-        */
-       return DIV_ROUND_UP(ticks * efx->timer_quantum_ns, 1000);
-}
-
 /* Set interrupt moderation parameters */
 int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
                            unsigned int rx_usecs, bool rx_adaptive,
index 7a6cab883d66dc4c76bfa6cbc610b0899c62192d..45e1916866256ac646c7e170a74587ded5cb6982 100644 (file)
@@ -168,7 +168,6 @@ extern const struct ethtool_ops efx_ethtool_ops;
 
 /* Global */
 unsigned int efx_usecs_to_ticks(struct efx_nic *efx, unsigned int usecs);
-unsigned int efx_ticks_to_usecs(struct efx_nic *efx, unsigned int ticks);
 int efx_init_irq_moderation(struct efx_nic *efx, unsigned int tx_usecs,
                            unsigned int rx_usecs, bool rx_adaptive,
                            bool rx_may_override_tx);
index 13cf647051af0543289a98b03ab4af6cff6394b6..c88ec3e24836217cea77c75ece8be8d14e5cd15d 100644 (file)
@@ -635,22 +635,6 @@ int __efx_reconfigure_port(struct efx_nic *efx)
        return rc;
 }
 
-/* Reinitialise the MAC to pick up new PHY settings, even if the port is
- * disabled.
- */
-int efx_reconfigure_port(struct efx_nic *efx)
-{
-       int rc;
-
-       EFX_ASSERT_RESET_SERIALISED(efx);
-
-       mutex_lock(&efx->mac_lock);
-       rc = __efx_reconfigure_port(efx);
-       mutex_unlock(&efx->mac_lock);
-
-       return rc;
-}
-
 /**************************************************************************
  *
  * Device reset and suspend
index 2c54dac3e6624591ae50c6be233a2af724f851cd..19a8ca530969b79a02908db00037b32e3af7b417 100644 (file)
@@ -40,7 +40,6 @@ void efx_destroy_reset_workqueue(void);
 void efx_start_monitor(struct efx_nic *efx);
 
 int __efx_reconfigure_port(struct efx_nic *efx);
-int efx_reconfigure_port(struct efx_nic *efx);
 
 #define EFX_ASSERT_RESET_SERIALISED(efx)                               \
        do {                                                            \
index aaacdcfa54ae1111a9ecb9a7ead41470a89717ce..36bceeeb6483a7f852ef1d3b024367db518c85c3 100644 (file)
@@ -1800,11 +1800,6 @@ int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
        return NETDEV_TX_OK;
 }
 
-int efx_ptp_get_mode(struct efx_nic *efx)
-{
-       return efx->ptp_data->mode;
-}
-
 int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
                        unsigned int new_mode)
 {
index 6946203499ef1ecc5bfd374366efc70a6a1a9453..feab7bdd7889d7295089b3e01b5d31592d107b74 100644 (file)
@@ -26,7 +26,6 @@ int efx_ptp_get_ts_config(struct efx_nic *efx,
 void efx_ptp_get_ts_info(struct efx_nic *efx,
                         struct kernel_ethtool_ts_info *ts_info);
 bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
-int efx_ptp_get_mode(struct efx_nic *efx);
 int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
                        unsigned int new_mode);
 int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
index 822ec6564b2d2f7016e04a15103ca552150db9b7..4dff19b6ef17b62912b132c2f2da72dd8e147922 100644 (file)
@@ -49,14 +49,6 @@ static inline u8 *efx_tx_get_copy_buffer(struct efx_tx_queue *tx_queue,
        return (u8 *)page_buf->addr + offset;
 }
 
-u8 *efx_tx_get_copy_buffer_limited(struct efx_tx_queue *tx_queue,
-                                  struct efx_tx_buffer *buffer, size_t len)
-{
-       if (len > EFX_TX_CB_SIZE)
-               return NULL;
-       return efx_tx_get_copy_buffer(tx_queue, buffer);
-}
-
 static void efx_tx_maybe_stop_queue(struct efx_tx_queue *txq1)
 {
        /* We need to consider all queues that the net core sees as one */
index f2c4d2f89919d2530bdf1f2a40b37a442d69bac1..f882749af8c32ad392cb0044d0f9b1734badc99f 100644 (file)
@@ -15,9 +15,6 @@
 unsigned int efx_tx_limit_len(struct efx_tx_queue *tx_queue,
                              dma_addr_t dma_addr, unsigned int len);
 
-u8 *efx_tx_get_copy_buffer_limited(struct efx_tx_queue *tx_queue,
-                                  struct efx_tx_buffer *buffer, size_t len);
-
 /* What TXQ type will satisfy the checksum offloads required for this skb? */
 static inline unsigned int efx_tx_csum_type_skb(struct sk_buff *skb)
 {