netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Habets <habetsm.xilinx@gmail.com>
To: linux@treblig.org
Cc: ecree.xilinx@gmail.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-net-drivers@amd.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 3/4] sfc: Remove unused mcdi functions
Date: Tue, 5 Nov 2024 09:33:21 +0000	[thread overview]
Message-ID: <20241105093321.GC595392@gmail.com> (raw)
In-Reply-To: <20241102151625.39535-4-linux@treblig.org>

On Sat, Nov 02, 2024 at 03:16:24PM +0000, linux@treblig.org wrote:
> 
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> efx_mcdi_flush_rxqs(), efx_mcdi_rpc_async_quiet(),
> efx_mcdi_rpc_finish_quiet(), and efx_mcdi_wol_filter_get_magic()
> are unused.
> I think these are fall out from the split into Siena
> that happened in
> commit 4d49e5cd4b09 ("sfc/siena: Rename functions in mcdi headers to avoid
> conflicts with sfc")
> and
> commit d48523cb88e0 ("sfc: Copy shared files needed for Siena (part 2)")
> 
> Remove them.
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>

Thanks.

Acked-by: Martin Habets <habetsm.xilinx@gmail.com>

> ---
>  drivers/net/ethernet/sfc/mcdi.c | 76 ---------------------------------
>  drivers/net/ethernet/sfc/mcdi.h | 10 -----
>  2 files changed, 86 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c
> index 76578502226e..d461b1a6ce81 100644
> --- a/drivers/net/ethernet/sfc/mcdi.c
> +++ b/drivers/net/ethernet/sfc/mcdi.c
> @@ -1051,15 +1051,6 @@ efx_mcdi_rpc_async(struct efx_nic *efx, unsigned int cmd,
>  				   cookie, false);
>  }
>  
> -int efx_mcdi_rpc_async_quiet(struct efx_nic *efx, unsigned int cmd,
> -			     const efx_dword_t *inbuf, size_t inlen,
> -			     size_t outlen, efx_mcdi_async_completer *complete,
> -			     unsigned long cookie)
> -{
> -	return _efx_mcdi_rpc_async(efx, cmd, inbuf, inlen, outlen, complete,
> -				   cookie, true);
> -}
> -
>  int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigned cmd, size_t inlen,
>  			efx_dword_t *outbuf, size_t outlen,
>  			size_t *outlen_actual)
> @@ -1068,14 +1059,6 @@ int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigned cmd, size_t inlen,
>  				    outlen_actual, false, NULL, NULL);
>  }
>  
> -int efx_mcdi_rpc_finish_quiet(struct efx_nic *efx, unsigned cmd, size_t inlen,
> -			      efx_dword_t *outbuf, size_t outlen,
> -			      size_t *outlen_actual)
> -{
> -	return _efx_mcdi_rpc_finish(efx, cmd, inlen, outbuf, outlen,
> -				    outlen_actual, true, NULL, NULL);
> -}
> -
>  void efx_mcdi_display_error(struct efx_nic *efx, unsigned cmd,
>  			    size_t inlen, efx_dword_t *outbuf,
>  			    size_t outlen, int rc)
> @@ -1982,33 +1965,6 @@ efx_mcdi_wol_filter_set_magic(struct efx_nic *efx,  const u8 *mac, int *id_out)
>  }
>  
>  
> -int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out)
> -{
> -	MCDI_DECLARE_BUF(outbuf, MC_CMD_WOL_FILTER_GET_OUT_LEN);
> -	size_t outlen;
> -	int rc;
> -
> -	rc = efx_mcdi_rpc(efx, MC_CMD_WOL_FILTER_GET, NULL, 0,
> -			  outbuf, sizeof(outbuf), &outlen);
> -	if (rc)
> -		goto fail;
> -
> -	if (outlen < MC_CMD_WOL_FILTER_GET_OUT_LEN) {
> -		rc = -EIO;
> -		goto fail;
> -	}
> -
> -	*id_out = (int)MCDI_DWORD(outbuf, WOL_FILTER_GET_OUT_FILTER_ID);
> -
> -	return 0;
> -
> -fail:
> -	*id_out = -1;
> -	netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n", __func__, rc);
> -	return rc;
> -}
> -
> -
>  int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id)
>  {
>  	MCDI_DECLARE_BUF(inbuf, MC_CMD_WOL_FILTER_REMOVE_IN_LEN);
> @@ -2021,38 +1977,6 @@ int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id)
>  	return rc;
>  }
>  
> -int efx_mcdi_flush_rxqs(struct efx_nic *efx)
> -{
> -	struct efx_channel *channel;
> -	struct efx_rx_queue *rx_queue;
> -	MCDI_DECLARE_BUF(inbuf,
> -			 MC_CMD_FLUSH_RX_QUEUES_IN_LEN(EFX_MAX_CHANNELS));
> -	int rc, count;
> -
> -	BUILD_BUG_ON(EFX_MAX_CHANNELS >
> -		     MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM);
> -
> -	count = 0;
> -	efx_for_each_channel(channel, efx) {
> -		efx_for_each_channel_rx_queue(rx_queue, channel) {
> -			if (rx_queue->flush_pending) {
> -				rx_queue->flush_pending = false;
> -				atomic_dec(&efx->rxq_flush_pending);
> -				MCDI_SET_ARRAY_DWORD(
> -					inbuf, FLUSH_RX_QUEUES_IN_QID_OFST,
> -					count, efx_rx_queue_index(rx_queue));
> -				count++;
> -			}
> -		}
> -	}
> -
> -	rc = efx_mcdi_rpc(efx, MC_CMD_FLUSH_RX_QUEUES, inbuf,
> -			  MC_CMD_FLUSH_RX_QUEUES_IN_LEN(count), NULL, 0, NULL);
> -	WARN_ON(rc < 0);
> -
> -	return rc;
> -}
> -
>  int efx_mcdi_wol_filter_reset(struct efx_nic *efx)
>  {
>  	int rc;
> diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h
> index ea612c619874..cdb17d7c147f 100644
> --- a/drivers/net/ethernet/sfc/mcdi.h
> +++ b/drivers/net/ethernet/sfc/mcdi.h
> @@ -155,9 +155,6 @@ int efx_mcdi_rpc_start(struct efx_nic *efx, unsigned cmd,
>  int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigned cmd, size_t inlen,
>  			efx_dword_t *outbuf, size_t outlen,
>  			size_t *outlen_actual);
> -int efx_mcdi_rpc_finish_quiet(struct efx_nic *efx, unsigned cmd,
> -			      size_t inlen, efx_dword_t *outbuf,
> -			      size_t outlen, size_t *outlen_actual);
>  
>  typedef void efx_mcdi_async_completer(struct efx_nic *efx,
>  				      unsigned long cookie, int rc,
> @@ -167,11 +164,6 @@ int efx_mcdi_rpc_async(struct efx_nic *efx, unsigned int cmd,
>  		       const efx_dword_t *inbuf, size_t inlen, size_t outlen,
>  		       efx_mcdi_async_completer *complete,
>  		       unsigned long cookie);
> -int efx_mcdi_rpc_async_quiet(struct efx_nic *efx, unsigned int cmd,
> -			     const efx_dword_t *inbuf, size_t inlen,
> -			     size_t outlen,
> -			     efx_mcdi_async_completer *complete,
> -			     unsigned long cookie);
>  
>  void efx_mcdi_display_error(struct efx_nic *efx, unsigned cmd,
>  			    size_t inlen, efx_dword_t *outbuf,
> @@ -410,10 +402,8 @@ int efx_mcdi_handle_assertion(struct efx_nic *efx);
>  int efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode);
>  int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, const u8 *mac,
>  				  int *id_out);
> -int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out);
>  int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id);
>  int efx_mcdi_wol_filter_reset(struct efx_nic *efx);
> -int efx_mcdi_flush_rxqs(struct efx_nic *efx);
>  void efx_mcdi_process_link_change(struct efx_nic *efx, efx_qword_t *ev);
>  void efx_mcdi_mac_start_stats(struct efx_nic *efx);
>  void efx_mcdi_mac_stop_stats(struct efx_nic *efx);
> -- 
> 2.47.0
> 

  reply	other threads:[~2024-11-05  9:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-02 15:16 [PATCH net-next 0/4] A pile of sfc deadcode linux
2024-11-02 15:16 ` [PATCH net-next 1/4] sfc: Remove falcon deadcode linux
2024-11-05  9:24   ` Martin Habets
2024-11-02 15:16 ` [PATCH net-next 2/4] sfc: Remove unused efx_mae_mport_vf linux
2024-11-05  9:28   ` Martin Habets
2024-11-02 15:16 ` [PATCH net-next 3/4] sfc: Remove unused mcdi functions linux
2024-11-05  9:33   ` Martin Habets [this message]
2024-11-02 15:16 ` [PATCH net-next 4/4] sfc: Remove more unused functions linux
2024-11-05  9:41   ` Martin Habets
2024-11-06  1:40 ` [PATCH net-next 0/4] A pile of sfc deadcode patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241105093321.GC595392@gmail.com \
    --to=habetsm.xilinx@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=linux@treblig.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).