Skip to content

Commit 104fc15

Browse files
committed
i40e: Remove unused i40e_del_filter
JIRA: https://issues.redhat.com/browse/RHEL-83569 commit 38dfb07 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:14 2025 +0000 i40e: Remove unused i40e_del_filter The last use of i40e_del_filter() was removed in 2016 by commit 9569a9a ("i40e: when adding or removing MAC filters, correctly handle VLANs") Remove it. Fix up a comment that referenced it. Note: The __ version of this function is still used. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-7-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Dennis Chen <dechen@redhat.com>
1 parent 5c0b3bb commit 104fc15

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,6 @@ void i40e_set_ethtool_ops(struct net_device *netdev);
11981198
struct i40e_mac_filter *i40e_add_filter(struct i40e_vsi *vsi,
11991199
const u8 *macaddr, s16 vlan);
12001200
void __i40e_del_filter(struct i40e_vsi *vsi, struct i40e_mac_filter *f);
1201-
void i40e_del_filter(struct i40e_vsi *vsi, const u8 *macaddr, s16 vlan);
12021201
int i40e_sync_vsi_filters(struct i40e_vsi *vsi);
12031202
struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type,
12041203
u16 uplink, u32 param1);

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,9 +1666,8 @@ struct i40e_mac_filter *i40e_add_filter(struct i40e_vsi *vsi,
16661666
* @vsi: VSI to remove from
16671667
* @f: the filter to remove from the list
16681668
*
1669-
* This function should be called instead of i40e_del_filter only if you know
1670-
* the exact filter you will remove already, such as via i40e_find_filter or
1671-
* i40e_find_mac.
1669+
* This function requires you've found * the exact filter you will remove
1670+
* already, such as via i40e_find_filter or i40e_find_mac.
16721671
*
16731672
* NOTE: This function is expected to be called with mac_filter_hash_lock
16741673
* being held.
@@ -1697,29 +1696,6 @@ void __i40e_del_filter(struct i40e_vsi *vsi, struct i40e_mac_filter *f)
16971696
set_bit(__I40E_MACVLAN_SYNC_PENDING, vsi->back->state);
16981697
}
16991698

1700-
/**
1701-
* i40e_del_filter - Remove a MAC/VLAN filter from the VSI
1702-
* @vsi: the VSI to be searched
1703-
* @macaddr: the MAC address
1704-
* @vlan: the VLAN
1705-
*
1706-
* NOTE: This function is expected to be called with mac_filter_hash_lock
1707-
* being held.
1708-
* ANOTHER NOTE: This function MUST be called from within the context of
1709-
* the "safe" variants of any list iterators, e.g. list_for_each_entry_safe()
1710-
* instead of list_for_each_entry().
1711-
**/
1712-
void i40e_del_filter(struct i40e_vsi *vsi, const u8 *macaddr, s16 vlan)
1713-
{
1714-
struct i40e_mac_filter *f;
1715-
1716-
if (!vsi || !macaddr)
1717-
return;
1718-
1719-
f = i40e_find_filter(vsi, macaddr, vlan);
1720-
__i40e_del_filter(vsi, f);
1721-
}
1722-
17231699
/**
17241700
* i40e_add_mac_filter - Add a MAC filter for all active VLANs
17251701
* @vsi: the VSI to be searched

0 commit comments

Comments
 (0)