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

sfc: Remove unused mcdi functions

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>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Link: https://patch.msgid.link/20241102151625.39535-4-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

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

-86
-76
drivers/net/ethernet/sfc/mcdi.c
··· 1051 1051 cookie, false); 1052 1052 } 1053 1053 1054 - int efx_mcdi_rpc_async_quiet(struct efx_nic *efx, unsigned int cmd, 1055 - const efx_dword_t *inbuf, size_t inlen, 1056 - size_t outlen, efx_mcdi_async_completer *complete, 1057 - unsigned long cookie) 1058 - { 1059 - return _efx_mcdi_rpc_async(efx, cmd, inbuf, inlen, outlen, complete, 1060 - cookie, true); 1061 - } 1062 - 1063 1054 int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigned cmd, size_t inlen, 1064 1055 efx_dword_t *outbuf, size_t outlen, 1065 1056 size_t *outlen_actual) 1066 1057 { 1067 1058 return _efx_mcdi_rpc_finish(efx, cmd, inlen, outbuf, outlen, 1068 1059 outlen_actual, false, NULL, NULL); 1069 - } 1070 - 1071 - int efx_mcdi_rpc_finish_quiet(struct efx_nic *efx, unsigned cmd, size_t inlen, 1072 - efx_dword_t *outbuf, size_t outlen, 1073 - size_t *outlen_actual) 1074 - { 1075 - return _efx_mcdi_rpc_finish(efx, cmd, inlen, outbuf, outlen, 1076 - outlen_actual, true, NULL, NULL); 1077 1060 } 1078 1061 1079 1062 void efx_mcdi_display_error(struct efx_nic *efx, unsigned cmd, ··· 1965 1982 } 1966 1983 1967 1984 1968 - int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out) 1969 - { 1970 - MCDI_DECLARE_BUF(outbuf, MC_CMD_WOL_FILTER_GET_OUT_LEN); 1971 - size_t outlen; 1972 - int rc; 1973 - 1974 - rc = efx_mcdi_rpc(efx, MC_CMD_WOL_FILTER_GET, NULL, 0, 1975 - outbuf, sizeof(outbuf), &outlen); 1976 - if (rc) 1977 - goto fail; 1978 - 1979 - if (outlen < MC_CMD_WOL_FILTER_GET_OUT_LEN) { 1980 - rc = -EIO; 1981 - goto fail; 1982 - } 1983 - 1984 - *id_out = (int)MCDI_DWORD(outbuf, WOL_FILTER_GET_OUT_FILTER_ID); 1985 - 1986 - return 0; 1987 - 1988 - fail: 1989 - *id_out = -1; 1990 - netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n", __func__, rc); 1991 - return rc; 1992 - } 1993 - 1994 - 1995 1985 int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id) 1996 1986 { 1997 1987 MCDI_DECLARE_BUF(inbuf, MC_CMD_WOL_FILTER_REMOVE_IN_LEN); ··· 1974 2018 1975 2019 rc = efx_mcdi_rpc(efx, MC_CMD_WOL_FILTER_REMOVE, inbuf, sizeof(inbuf), 1976 2020 NULL, 0, NULL); 1977 - return rc; 1978 - } 1979 - 1980 - int efx_mcdi_flush_rxqs(struct efx_nic *efx) 1981 - { 1982 - struct efx_channel *channel; 1983 - struct efx_rx_queue *rx_queue; 1984 - MCDI_DECLARE_BUF(inbuf, 1985 - MC_CMD_FLUSH_RX_QUEUES_IN_LEN(EFX_MAX_CHANNELS)); 1986 - int rc, count; 1987 - 1988 - BUILD_BUG_ON(EFX_MAX_CHANNELS > 1989 - MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM); 1990 - 1991 - count = 0; 1992 - efx_for_each_channel(channel, efx) { 1993 - efx_for_each_channel_rx_queue(rx_queue, channel) { 1994 - if (rx_queue->flush_pending) { 1995 - rx_queue->flush_pending = false; 1996 - atomic_dec(&efx->rxq_flush_pending); 1997 - MCDI_SET_ARRAY_DWORD( 1998 - inbuf, FLUSH_RX_QUEUES_IN_QID_OFST, 1999 - count, efx_rx_queue_index(rx_queue)); 2000 - count++; 2001 - } 2002 - } 2003 - } 2004 - 2005 - rc = efx_mcdi_rpc(efx, MC_CMD_FLUSH_RX_QUEUES, inbuf, 2006 - MC_CMD_FLUSH_RX_QUEUES_IN_LEN(count), NULL, 0, NULL); 2007 - WARN_ON(rc < 0); 2008 - 2009 2021 return rc; 2010 2022 } 2011 2023
-10
drivers/net/ethernet/sfc/mcdi.h
··· 155 155 int efx_mcdi_rpc_finish(struct efx_nic *efx, unsigned cmd, size_t inlen, 156 156 efx_dword_t *outbuf, size_t outlen, 157 157 size_t *outlen_actual); 158 - int efx_mcdi_rpc_finish_quiet(struct efx_nic *efx, unsigned cmd, 159 - size_t inlen, efx_dword_t *outbuf, 160 - size_t outlen, size_t *outlen_actual); 161 158 162 159 typedef void efx_mcdi_async_completer(struct efx_nic *efx, 163 160 unsigned long cookie, int rc, ··· 164 167 const efx_dword_t *inbuf, size_t inlen, size_t outlen, 165 168 efx_mcdi_async_completer *complete, 166 169 unsigned long cookie); 167 - int efx_mcdi_rpc_async_quiet(struct efx_nic *efx, unsigned int cmd, 168 - const efx_dword_t *inbuf, size_t inlen, 169 - size_t outlen, 170 - efx_mcdi_async_completer *complete, 171 - unsigned long cookie); 172 170 173 171 void efx_mcdi_display_error(struct efx_nic *efx, unsigned cmd, 174 172 size_t inlen, efx_dword_t *outbuf, ··· 402 410 int efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); 403 411 int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, const u8 *mac, 404 412 int *id_out); 405 - int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out); 406 413 int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id); 407 414 int efx_mcdi_wol_filter_reset(struct efx_nic *efx); 408 - int efx_mcdi_flush_rxqs(struct efx_nic *efx); 409 415 void efx_mcdi_process_link_change(struct efx_nic *efx, efx_qword_t *ev); 410 416 void efx_mcdi_mac_start_stats(struct efx_nic *efx); 411 417 void efx_mcdi_mac_stop_stats(struct efx_nic *efx);