mlxsw: spectrum_buffers: Use defines for pool indices
authorIdo Schimmel <idosch@mellanox.com>
Mon, 22 Apr 2019 12:08:42 +0000 (12:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Apr 2019 05:09:32 +0000 (22:09 -0700)
commit93d3668c027d8f6dd55d0b904d88675726662d99
tree923a0efb462cc8394cc9aeeb9a55c9d2250ce06b
parent8f6862065d8be320ba45a52c8a361b580722fc18
mlxsw: spectrum_buffers: Use defines for pool indices

The pool indices are currently hard coded throughout the code, which
makes the code hard to follow and extend.

Overcome this by using defines for the pool indices.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c