mlxsw: spectrum: Drop unused functions mlxsw_sp_port_lower_dev_hold/_put()
authorPetr Machata <petrm@nvidia.com>
Thu, 27 Jul 2023 15:59:19 +0000 (17:59 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 28 Jul 2023 20:38:45 +0000 (13:38 -0700)
As of commit 151b89f6025a ("mlxsw: spectrum_router: Reuse work neighbor
initialization in work scheduler"), the functions
mlxsw_sp_port_lower_dev_hold() and mlxsw_sp_port_dev_put() have no users.
Drop them.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/d0adcd7cb4ea19416294a0f861100edba84c9f36.1690471774.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h

index f0f6af3ec7c57079749c2110ea725b919f302120..9dbd5edff0b023a76cea4735dcb37bd7d02c50f8 100644 (file)
@@ -4112,23 +4112,6 @@ struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find_rcu(struct net_device *dev)
        return (struct mlxsw_sp_port *)priv.data;
 }
 
-struct mlxsw_sp_port *mlxsw_sp_port_lower_dev_hold(struct net_device *dev)
-{
-       struct mlxsw_sp_port *mlxsw_sp_port;
-
-       rcu_read_lock();
-       mlxsw_sp_port = mlxsw_sp_port_dev_lower_find_rcu(dev);
-       if (mlxsw_sp_port)
-               dev_hold(mlxsw_sp_port->dev);
-       rcu_read_unlock();
-       return mlxsw_sp_port;
-}
-
-void mlxsw_sp_port_dev_put(struct mlxsw_sp_port *mlxsw_sp_port)
-{
-       dev_put(mlxsw_sp_port->dev);
-}
-
 int mlxsw_sp_parsing_depth_inc(struct mlxsw_sp *mlxsw_sp)
 {
        char mprs_pl[MLXSW_REG_MPRS_LEN];
index 65eaa181e0aa64a03e7dffc01d56a088b6afdd38..62151f0531aeee5c3aa0acd18d19a9714d6a1f84 100644 (file)
@@ -720,8 +720,6 @@ int mlxsw_sp_txhdr_ptp_data_construct(struct mlxsw_core *mlxsw_core,
 bool mlxsw_sp_port_dev_check(const struct net_device *dev);
 struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev);
 struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find(struct net_device *dev);
-struct mlxsw_sp_port *mlxsw_sp_port_lower_dev_hold(struct net_device *dev);
-void mlxsw_sp_port_dev_put(struct mlxsw_sp_port *mlxsw_sp_port);
 struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find_rcu(struct net_device *dev);
 int mlxsw_sp_parsing_depth_inc(struct mlxsw_sp *mlxsw_sp);
 void mlxsw_sp_parsing_depth_dec(struct mlxsw_sp *mlxsw_sp);