aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorPedro Tammela <[email protected]>2024-01-05 00:38:10 +0000
committerDavid S. Miller <[email protected]>2024-01-07 14:58:26 +0000
commit405cd9fc6f44f7a54505019bea60de83f1c58365 (patch)
treec5b38ebf3cfa1dd88c528ed7ab09088e0ad8782e /net/sched/cls_api.c
parentnfp: flower: Remove usage of the deprecated ida_simple_xx() API (diff)
downloadkernel-405cd9fc6f44f7a54505019bea60de83f1c58365.tar.gz
kernel-405cd9fc6f44f7a54505019bea60de83f1c58365.zip
net/sched: simplify tc_action_load_ops parameters
Instead of using two bools derived from a flags passed as arguments to the parent function of tc_action_load_ops, just pass the flags itself to tc_action_load_ops to simplify its parameters. Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Pedro Tammela <[email protected]> Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r--net/sched/cls_api.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 253b26f2eddd..e3236a3169c3 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3314,12 +3314,11 @@ int tcf_exts_validate_ex(struct net *net, struct tcf_proto *tp, struct nlattr **
if (exts->police && tb[exts->police]) {
struct tc_action_ops *a_o;
- a_o = tc_action_load_ops(tb[exts->police], true,
- !(flags & TCA_ACT_FLAGS_NO_RTNL),
+ flags |= TCA_ACT_FLAGS_POLICE | TCA_ACT_FLAGS_BIND;
+ a_o = tc_action_load_ops(tb[exts->police], flags,
extack);
if (IS_ERR(a_o))
return PTR_ERR(a_o);
- flags |= TCA_ACT_FLAGS_POLICE | TCA_ACT_FLAGS_BIND;
act = tcf_action_init_1(net, tp, tb[exts->police],
rate_tlv, a_o, init_res, flags,
extack);