]> asedeno.scripts.mit.edu Git - linux.git/commit
mlxsw: spectrum_kvdl: Fix handling of resource_size_param
authorJiri Pirko <jiri@mellanox.com>
Sun, 1 Apr 2018 14:34:51 +0000 (17:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Apr 2018 14:56:41 +0000 (10:56 -0400)
commitc8276dd250e9a9833f8ff1da1cd53e6f7e6825e2
tree391da5a66bfdec002bdea19fb11dd97c40656956
parent9270aa0ddcf33527977bf4562ea3434c79af0d09
mlxsw: spectrum_kvdl: Fix handling of resource_size_param

Current code uses global variables, adjusts them and passes pointer down
to devlink. With every other mlxsw_core instance, the previously passed
pointer values are rewritten. Fix this by de-globalize the variables.

Fixes: 7f47b19bd744 ("mlxsw: spectrum_kvdl: Add support for per part occupancy")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c