summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-05-17 11:07:58 +0200
committerDavid S. Miller <davem@davemloft.net>2017-05-17 21:22:13 +0200
commit7961973a0087824fdc9d0303b0033ab79b557278 (patch)
tree44b543f8bd9e759cb5ff2ce586ec8d1b91eb2083 /net/sched
parentnet: sched: replace nprio by a bool to make the function more readable (diff)
downloadlinux-7961973a0087824fdc9d0303b0033ab79b557278.tar.xz
linux-7961973a0087824fdc9d0303b0033ab79b557278.zip
net: sched: move TC_H_MAJ macro call into tcf_auto_prio
Call the helper from the function rather than to always adjust the return value of the function. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index bf2e59cc1174..690457c988b2 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -125,7 +125,7 @@ static inline u32 tcf_auto_prio(struct tcf_proto *tp)
if (tp)
first = tp->prio - 1;
- return first;
+ return TC_H_MAJ(first);
}
static struct tcf_proto *tcf_proto_create(const char *kind, u32 protocol,
@@ -411,7 +411,7 @@ replay:
}
if (prio_allocate)
- prio = TC_H_MAJ(tcf_auto_prio(rtnl_dereference(*back)));
+ prio = tcf_auto_prio(rtnl_dereference(*back));
tp = tcf_proto_create(nla_data(tca[TCA_KIND]),
protocol, prio, parent, q, block);