mlxsw: spectrum_acl: Use block variable in mlxsw_sp_acl_rule_del()
authorJiri Pirko <jiri@mellanox.com>
Mon, 27 Apr 2020 15:13:02 +0000 (18:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Apr 2020 19:43:29 +0000 (12:43 -0700)
On couple of places in mlxsw_sp_acl_rule_del(), block variable is not
used directly as it could be. So do it.

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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c

index 800eaa6be3c03812691a9497dfed6de6156443c5..c61f78e30397ca15530d4a5ee6f6372c3eab934a 100644 (file)
@@ -704,14 +704,13 @@ void mlxsw_sp_acl_rule_del(struct mlxsw_sp *mlxsw_sp,
 
        block->egress_blocker_rule_count -= rule->rulei->egress_bind_blocker;
        block->ingress_blocker_rule_count -= rule->rulei->ingress_bind_blocker;
-       ruleset->ht_key.block->rule_count--;
+       block->rule_count--;
        mutex_lock(&mlxsw_sp->acl->rules_lock);
        list_del(&rule->list);
        mutex_unlock(&mlxsw_sp->acl->rules_lock);
        if (!ruleset->ht_key.chain_index &&
            mlxsw_sp_acl_ruleset_is_singular(ruleset))
-               mlxsw_sp_acl_ruleset_block_unbind(mlxsw_sp, ruleset,
-                                                 ruleset->ht_key.block);
+               mlxsw_sp_acl_ruleset_block_unbind(mlxsw_sp, ruleset, block);
        rhashtable_remove_fast(&ruleset->rule_ht, &rule->ht_node,
                               mlxsw_sp_acl_rule_ht_params);
        ops->rule_del(mlxsw_sp, rule->priv);