]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: delete dead code in mlx5_esw_unlock()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 30 May 2022 11:40:42 +0000 (14:40 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 2 Jul 2022 18:58:25 +0000 (11:58 -0700)
commit2cf22fd9eac2415ad78aa02c7ab9582c07634e40
treebae51fda68ab24d0c50e9442746dc78704ff340b
parent9cff3eaa497d80478c38cdda9fcbb4b3efd4e63a
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 c6a85b7cf2dc ("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>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c