Skip to content

Commit

Permalink
mlxsw: spectrum_buffers: Use designated initializers for mlxsw_sp_pbs
Browse files Browse the repository at this point in the history
Suggested-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Apr 15, 2016
1 parent de33efd commit ce78f02
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,8 @@ static int mlxsw_sp_sb_pm_occ_query(struct mlxsw_sp *mlxsw_sp, u8 local_port,
}

static const u16 mlxsw_sp_pbs[] = {
2 * MLXSW_SP_BYTES_TO_CELLS(ETH_FRAME_LEN),
0,
0,
0,
0,
0,
0,
0,
0, /* Unused */
2 * MLXSW_SP_BYTES_TO_CELLS(MLXSW_PORT_MAX_MTU),
[0] = 2 * MLXSW_SP_BYTES_TO_CELLS(ETH_FRAME_LEN),
[9] = 2 * MLXSW_SP_BYTES_TO_CELLS(MLXSW_PORT_MAX_MTU),
};

#define MLXSW_SP_PBS_LEN ARRAY_SIZE(mlxsw_sp_pbs)
Expand Down

0 comments on commit ce78f02

Please sign in to comment.