Skip to content

Commit

Permalink
mlxsw: spectrum: Cosmetic naming change
Browse files Browse the repository at this point in the history
Currently the struct representing router interface "mlxsw_sp_rif"
is reffered as "r" in various places in the driver. Furthermore it
contains a member which specify the index which is called "rif".
This patch change "r" to "rif" and "rif" to "rif_index".

Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arkadi Sharshevsky authored and David S. Miller committed Mar 22, 2017
1 parent 33928ee commit bf95233
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 146 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum.c
Original file line number Diff line number Diff line change
Expand Up @@ -4088,8 +4088,8 @@ static void mlxsw_sp_master_bridge_vlan_unlink(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_fid *f;

f = mlxsw_sp_fid_find(mlxsw_sp, fid);
if (f && f->r)
mlxsw_sp_rif_bridge_destroy(mlxsw_sp, f->r);
if (f && f->rif)
mlxsw_sp_rif_bridge_destroy(mlxsw_sp, f->rif);
if (f && --f->ref_count == 0)
mlxsw_sp_fid_destroy(mlxsw_sp, f);
}
Expand Down Expand Up @@ -4206,8 +4206,8 @@ static void mlxsw_sp_vfid_destroy(struct mlxsw_sp *mlxsw_sp,
clear_bit(vfid, mlxsw_sp->vfids.mapped);
list_del(&f->list);

if (f->r)
mlxsw_sp_rif_bridge_destroy(mlxsw_sp, f->r);
if (f->rif)
mlxsw_sp_rif_bridge_destroy(mlxsw_sp, f->rif);

kfree(f);

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct mlxsw_sp_fid {
struct list_head list;
unsigned int ref_count;
struct net_device *dev;
struct mlxsw_sp_rif *r;
struct mlxsw_sp_rif *rif;
u16 fid;
};

Expand Down Expand Up @@ -577,7 +577,7 @@ int mlxsw_sp_netdevice_router_port_event(struct net_device *dev);
int mlxsw_sp_inetaddr_event(struct notifier_block *unused,
unsigned long event, void *ptr);
void mlxsw_sp_rif_bridge_destroy(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_rif *r);
struct mlxsw_sp_rif *rif);
int mlxsw_sp_vport_vrf_join(struct mlxsw_sp_port *mlxsw_sp_vport);
void mlxsw_sp_vport_vrf_leave(struct mlxsw_sp_port *mlxsw_sp_vport);
int mlxsw_sp_port_vrf_join(struct mlxsw_sp_port *mlxsw_sp_port);
Expand Down
Loading

0 comments on commit bf95233

Please sign in to comment.