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

Commit 42d704e0 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

mlxsw: spectrum_acl: Remove unnecessary arg on action_replace call path



No need to pass ruleset/group and chunk pointers on action_replace call
path, nobody uses them.

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 889865cf
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -721,8 +721,7 @@ struct mlxsw_sp_acl_tcam_ops {
			  void *region_priv, void *chunk_priv,
			  void *entry_priv);
	int (*entry_action_replace)(struct mlxsw_sp *mlxsw_sp,
				    void *region_priv, void *chunk_priv,
				    void *entry_priv,
				    void *region_priv, void *entry_priv,
				    struct mlxsw_sp_acl_rule_info *rulei);
	int (*entry_activity_get)(struct mlxsw_sp *mlxsw_sp,
				  void *region_priv, void *entry_priv,
+1 −2
Original line number Diff line number Diff line
@@ -194,8 +194,7 @@ static void mlxsw_sp1_acl_tcam_entry_del(struct mlxsw_sp *mlxsw_sp,

static int
mlxsw_sp1_acl_tcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
					void *region_priv, void *chunk_priv,
					void *entry_priv,
					void *region_priv, void *entry_priv,
					struct mlxsw_sp_acl_rule_info *rulei)
{
	return -EOPNOTSUPP;
+1 −4
Original line number Diff line number Diff line
@@ -212,18 +212,15 @@ static void mlxsw_sp2_acl_tcam_entry_del(struct mlxsw_sp *mlxsw_sp,

static int
mlxsw_sp2_acl_tcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
					void *region_priv, void *chunk_priv,
					void *entry_priv,
					void *region_priv, void *entry_priv,
					struct mlxsw_sp_acl_rule_info *rulei)
{
	struct mlxsw_sp2_acl_tcam_region *region = region_priv;
	struct mlxsw_sp2_acl_tcam_chunk *chunk = chunk_priv;
	struct mlxsw_sp2_acl_tcam_entry *entry = entry_priv;

	entry->act_block = rulei->act_block;
	return mlxsw_sp_acl_atcam_entry_action_replace(mlxsw_sp,
						       &region->aregion,
						       &chunk->achunk,
						       &entry->aentry, rulei);
}

+1 −2
Original line number Diff line number Diff line
@@ -742,8 +742,7 @@ int mlxsw_sp_acl_rule_action_replace(struct mlxsw_sp *mlxsw_sp,
	rulei = mlxsw_sp_acl_rule_rulei(rule);
	rulei->act_block = afa_block;

	return ops->rule_action_replace(mlxsw_sp, ruleset->priv, rule->priv,
					rule->rulei);
	return ops->rule_action_replace(mlxsw_sp, rule->priv, rule->rulei);
}

struct mlxsw_sp_acl_rule *
+0 −2
Original line number Diff line number Diff line
@@ -603,7 +603,6 @@ void mlxsw_sp_acl_atcam_entry_del(struct mlxsw_sp *mlxsw_sp,
int
mlxsw_sp_acl_atcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
					struct mlxsw_sp_acl_atcam_region *aregion,
					struct mlxsw_sp_acl_atcam_chunk *achunk,
					struct mlxsw_sp_acl_atcam_entry *aentry,
					struct mlxsw_sp_acl_rule_info *rulei)
{
@@ -612,7 +611,6 @@ mlxsw_sp_acl_atcam_entry_action_replace(struct mlxsw_sp *mlxsw_sp,
	if (mlxsw_sp_acl_atcam_is_centry(aentry))
		err = mlxsw_sp_acl_ctcam_entry_action_replace(mlxsw_sp,
							      &aregion->cregion,
							      &achunk->cchunk,
							      &aentry->centry,
							      rulei);
	else
Loading