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

sfc: Remove now-unused filter function

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ben Hutchings and committed by
David S. Miller
8db182f4 b2bb7b77

-48
-2
drivers/net/ethernet/sfc/efx.h
··· 64 64 extern s32 efx_filter_insert_filter(struct efx_nic *efx, 65 65 struct efx_filter_spec *spec, 66 66 bool replace); 67 - extern int efx_filter_remove_filter(struct efx_nic *efx, 68 - struct efx_filter_spec *spec); 69 67 extern int efx_filter_remove_id_safe(struct efx_nic *efx, 70 68 enum efx_filter_priority priority, 71 69 u32 filter_id);
-46
drivers/net/ethernet/sfc/filter.c
··· 680 680 return rc; 681 681 } 682 682 683 - /** 684 - * efx_filter_remove_filter - remove a filter by specification 685 - * @efx: NIC from which to remove the filter 686 - * @spec: Specification for the filter 687 - * 688 - * On success, return zero. 689 - * On failure, return a negative error code. 690 - */ 691 - int efx_filter_remove_filter(struct efx_nic *efx, struct efx_filter_spec *spec) 692 - { 693 - struct efx_filter_state *state = efx->filter_state; 694 - struct efx_filter_table *table = efx_filter_spec_table(state, spec); 695 - struct efx_filter_spec *saved_spec; 696 - efx_oword_t filter; 697 - unsigned int filter_idx, depth; 698 - u32 key; 699 - int rc; 700 - 701 - if (!table) 702 - return -EINVAL; 703 - 704 - key = efx_filter_build(&filter, spec); 705 - 706 - spin_lock_bh(&state->lock); 707 - 708 - rc = efx_filter_search(table, spec, key, false, &depth); 709 - if (rc < 0) 710 - goto out; 711 - filter_idx = rc; 712 - saved_spec = &table->spec[filter_idx]; 713 - 714 - if (spec->priority < saved_spec->priority) { 715 - rc = -EPERM; 716 - goto out; 717 - } 718 - 719 - efx_filter_table_clear_entry(efx, table, filter_idx); 720 - if (table->used == 0) 721 - efx_filter_table_reset_search_depth(table); 722 - rc = 0; 723 - 724 - out: 725 - spin_unlock_bh(&state->lock); 726 - return rc; 727 - } 728 - 729 683 static void efx_filter_table_clear(struct efx_nic *efx, 730 684 enum efx_filter_table_id table_id, 731 685 enum efx_filter_priority priority)