mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 10:35:54 -04:00
net/mlx5: delete dead code in mlx5_esw_unlock()
Smatch complains about this function:
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c:2000 mlx5_esw_unlock()
warn: inconsistent returns '&esw->mode_lock'.
Before commit ec2fa47d7b ("net/mlx5: Lag, use lag lock") there
used to be a matching mlx5_esw_lock() function and the lock and
unlock functions were symmetric. But now we take the lock
unconditionally and must unlock unconditionally as well.
As near as I can tell this is dead code and can just be deleted.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
committed by
Saeed Mahameed
parent
9de64ae816
commit
8e755f7a8c
@@ -1995,8 +1995,6 @@ int mlx5_esw_try_lock(struct mlx5_eswitch *esw)
|
||||
*/
|
||||
void mlx5_esw_unlock(struct mlx5_eswitch *esw)
|
||||
{
|
||||
if (!mlx5_esw_allowed(esw))
|
||||
return;
|
||||
up_write(&esw->mode_lock);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user