[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241105094130.GD595392@gmail.com>
Date: Tue, 5 Nov 2024 09:41:30 +0000
From: Martin Habets <habetsm.xilinx@...il.com>
To: linux@...blig.org
Cc: ecree.xilinx@...il.com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, linux-net-drivers@....com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 4/4] sfc: Remove more unused functions
On Sat, Nov 02, 2024 at 03:16:25PM +0000, linux@...blig.org wrote:
>
> From: "Dr. David Alan Gilbert" <linux@...blig.org>
>
> 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@...blig.org>
Acked-by: Martin Habets <habetsm.xilinx@...il.com>
> ---
> drivers/net/ethernet/sfc/efx.c | 8 --------
> drivers/net/ethernet/sfc/efx.h | 1 -
> drivers/net/ethernet/sfc/efx_common.c | 16 ----------------
> drivers/net/ethernet/sfc/efx_common.h | 1 -
> drivers/net/ethernet/sfc/ptp.c | 5 -----
> drivers/net/ethernet/sfc/ptp.h | 1 -
> drivers/net/ethernet/sfc/tx.c | 8 --------
> drivers/net/ethernet/sfc/tx.h | 3 ---
> 8 files changed, 43 deletions(-)
>
> diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
> index 36b3b57e2055..0382ac30d1aa 100644
> --- a/drivers/net/ethernet/sfc/efx.c
> +++ b/drivers/net/ethernet/sfc/efx.c
> @@ -417,14 +417,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,
> diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h
> index 7a6cab883d66..45e191686625 100644
> --- a/drivers/net/ethernet/sfc/efx.h
> +++ b/drivers/net/ethernet/sfc/efx.h
> @@ -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);
> diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c
> index 13cf647051af..c88ec3e24836 100644
> --- a/drivers/net/ethernet/sfc/efx_common.c
> +++ b/drivers/net/ethernet/sfc/efx_common.c
> @@ -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
> diff --git a/drivers/net/ethernet/sfc/efx_common.h b/drivers/net/ethernet/sfc/efx_common.h
> index 2c54dac3e662..19a8ca530969 100644
> --- a/drivers/net/ethernet/sfc/efx_common.h
> +++ b/drivers/net/ethernet/sfc/efx_common.h
> @@ -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 { \
> diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
> index aaacdcfa54ae..36bceeeb6483 100644
> --- a/drivers/net/ethernet/sfc/ptp.c
> +++ b/drivers/net/ethernet/sfc/ptp.c
> @@ -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)
> {
> diff --git a/drivers/net/ethernet/sfc/ptp.h b/drivers/net/ethernet/sfc/ptp.h
> index 6946203499ef..feab7bdd7889 100644
> --- a/drivers/net/ethernet/sfc/ptp.h
> +++ b/drivers/net/ethernet/sfc/ptp.h
> @@ -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);
> diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
> index fe2d476028e7..6b4a343a455d 100644
> --- a/drivers/net/ethernet/sfc/tx.c
> +++ b/drivers/net/ethernet/sfc/tx.c
> @@ -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 */
> diff --git a/drivers/net/ethernet/sfc/tx.h b/drivers/net/ethernet/sfc/tx.h
> index f2c4d2f89919..f882749af8c3 100644
> --- a/drivers/net/ethernet/sfc/tx.h
> +++ b/drivers/net/ethernet/sfc/tx.h
> @@ -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)
> {
> --
> 2.47.0
>
Powered by blists - more mailing lists