forked from Minki/linux
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: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ad3f20b286
commit
88d2fbcda1
@ -3892,7 +3892,7 @@ static int mlxsw_sp_resources_register(struct mlxsw_core *mlxsw_core)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = mlxsw_sp_kvdl_resources_register(devlink);
|
||||
err = mlxsw_sp_kvdl_resources_register(mlxsw_core);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -443,7 +443,7 @@ int mlxsw_sp_kvdl_alloc_size_query(struct mlxsw_sp *mlxsw_sp,
|
||||
unsigned int entry_count,
|
||||
unsigned int *p_alloc_size);
|
||||
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 {
|
||||
unsigned int priority;
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
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;
|
||||
u32 kvdl_max_size;
|
||||
int err;
|
||||
|
Loading…
Reference in New Issue
Block a user