Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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;