Commit 1182e536 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

mlxsw: spectrum: Fix helper function and port variable names

Commit dd82364c ("mlxsw: Flip to the new dev walk API") did some
small changes in mlxsw code, but it did not respect the naming
conventions. So fix this now.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 95964c6d
...@@ -3326,13 +3326,13 @@ bool mlxsw_sp_port_dev_check(const struct net_device *dev) ...@@ -3326,13 +3326,13 @@ bool mlxsw_sp_port_dev_check(const struct net_device *dev)
return dev->netdev_ops == &mlxsw_sp_port_netdev_ops; return dev->netdev_ops == &mlxsw_sp_port_netdev_ops;
} }
static int mlxsw_lower_dev_walk(struct net_device *lower_dev, void *data) static int mlxsw_sp_lower_dev_walk(struct net_device *lower_dev, void *data)
{ {
struct mlxsw_sp_port **port = data; struct mlxsw_sp_port **p_mlxsw_sp_port = data;
int ret = 0; int ret = 0;
if (mlxsw_sp_port_dev_check(lower_dev)) { if (mlxsw_sp_port_dev_check(lower_dev)) {
*port = netdev_priv(lower_dev); *p_mlxsw_sp_port = netdev_priv(lower_dev);
ret = 1; ret = 1;
} }
...@@ -3341,15 +3341,15 @@ static int mlxsw_lower_dev_walk(struct net_device *lower_dev, void *data) ...@@ -3341,15 +3341,15 @@ static int mlxsw_lower_dev_walk(struct net_device *lower_dev, void *data)
static struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find(struct net_device *dev) static struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find(struct net_device *dev)
{ {
struct mlxsw_sp_port *port; struct mlxsw_sp_port *mlxsw_sp_port;
if (mlxsw_sp_port_dev_check(dev)) if (mlxsw_sp_port_dev_check(dev))
return netdev_priv(dev); return netdev_priv(dev);
port = NULL; mlxsw_sp_port = NULL;
netdev_walk_all_lower_dev(dev, mlxsw_lower_dev_walk, &port); netdev_walk_all_lower_dev(dev, mlxsw_sp_lower_dev_walk, &mlxsw_sp_port);
return port; return mlxsw_sp_port;
} }
static struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev) static struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev)
...@@ -3362,15 +3362,16 @@ static struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev) ...@@ -3362,15 +3362,16 @@ static struct mlxsw_sp *mlxsw_sp_lower_get(struct net_device *dev)
static struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find_rcu(struct net_device *dev) static struct mlxsw_sp_port *mlxsw_sp_port_dev_lower_find_rcu(struct net_device *dev)
{ {
struct mlxsw_sp_port *port; struct mlxsw_sp_port *mlxsw_sp_port;
if (mlxsw_sp_port_dev_check(dev)) if (mlxsw_sp_port_dev_check(dev))
return netdev_priv(dev); return netdev_priv(dev);
port = NULL; mlxsw_sp_port = NULL;
netdev_walk_all_lower_dev_rcu(dev, mlxsw_lower_dev_walk, &port); netdev_walk_all_lower_dev_rcu(dev, mlxsw_sp_lower_dev_walk,
&mlxsw_sp_port);
return port; return mlxsw_sp_port;
} }
struct mlxsw_sp_port *mlxsw_sp_port_lower_dev_hold(struct net_device *dev) struct mlxsw_sp_port *mlxsw_sp_port_lower_dev_hold(struct net_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment