net: sched: move TC_H_MAJ macro call into tcf_auto_prio
authorJiri Pirko <jiri@mellanox.com>
Wed, 17 May 2017 09:07:58 +0000 (11:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 May 2017 19:22:13 +0000 (15:22 -0400)
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>
net/sched/cls_api.c

index bf2e59cc117475ea1aeab461bf1f46da0ff18a52..690457c988b280259af2aeff2cda30013e2091b3 100644 (file)
@@ -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);