lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241105093321.GC595392@gmail.com>
Date: Tue, 5 Nov 2024 09:33:21 +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 3/4] sfc: Remove unused mcdi functions

On Sat, Nov 02, 2024 at 03:16:24PM +0000, linux@...blig.org wrote:
> 
> From: "Dr. David Alan Gilbert" <linux@...blig.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@...blig.org>

Thanks.

Acked-by: Martin Habets <habetsm.xilinx@...il.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ