Commit 88d2fbcd authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

mlxsw: spectrum: Pass mlxsw_core as arg of mlxsw_sp_kvdl_resources_register()

Pass struct mlxsw_core instead of devlink since it is nicer within mlxsw
code and we need both structs in mlxsw_sp_kvdl_resources_register()
anyway.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ad3f20b2
...@@ -3892,7 +3892,7 @@ static int mlxsw_sp_resources_register(struct mlxsw_core *mlxsw_core) ...@@ -3892,7 +3892,7 @@ static int mlxsw_sp_resources_register(struct mlxsw_core *mlxsw_core)
if (err) if (err)
return err; return err;
err = mlxsw_sp_kvdl_resources_register(devlink); err = mlxsw_sp_kvdl_resources_register(mlxsw_core);
if (err) if (err)
return err; return err;
......
...@@ -443,7 +443,7 @@ int mlxsw_sp_kvdl_alloc_size_query(struct mlxsw_sp *mlxsw_sp, ...@@ -443,7 +443,7 @@ int mlxsw_sp_kvdl_alloc_size_query(struct mlxsw_sp *mlxsw_sp,
unsigned int entry_count, unsigned int entry_count,
unsigned int *p_alloc_size); unsigned int *p_alloc_size);
u64 mlxsw_sp_kvdl_occ_get(const struct mlxsw_sp *mlxsw_sp); u64 mlxsw_sp_kvdl_occ_get(const struct mlxsw_sp *mlxsw_sp);
int mlxsw_sp_kvdl_resources_register(struct devlink *devlink); int mlxsw_sp_kvdl_resources_register(struct mlxsw_core *mlxsw_core);
struct mlxsw_sp_acl_rule_info { struct mlxsw_sp_acl_rule_info {
unsigned int priority; unsigned int priority;
......
...@@ -368,9 +368,9 @@ static const struct devlink_resource_ops mlxsw_sp_kvdl_chunks_large_ops = { ...@@ -368,9 +368,9 @@ static const struct devlink_resource_ops mlxsw_sp_kvdl_chunks_large_ops = {
.occ_get = mlxsw_sp_kvdl_large_chunks_occ_get, .occ_get = mlxsw_sp_kvdl_large_chunks_occ_get,
}; };
int mlxsw_sp_kvdl_resources_register(struct devlink *devlink) int mlxsw_sp_kvdl_resources_register(struct mlxsw_core *mlxsw_core)
{ {
struct mlxsw_core *mlxsw_core = devlink_priv(devlink); struct devlink *devlink = priv_to_devlink(mlxsw_core);
static struct devlink_resource_size_params size_params; static struct devlink_resource_size_params size_params;
u32 kvdl_max_size; u32 kvdl_max_size;
int err; int err;
......
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