From: Jiri Pirko Subject: [patch net-next v2 05/10] net: sched: move TC_H_MAJ macro call into tcf_auto_prio Date: Mon, 15 May 2017 10:38:52 +0200 Message-ID: <20170515083857.3615-6-jiri@resnulli.us> References: <20170515083857.3615-1-jiri@resnulli.us> Cc: davem@davemloft.net, jhs@mojatatu.com, xiyou.wangcong@gmail.com, dsa@cumulusnetworks.com, edumazet@google.com, stephen@networkplumber.org, daniel@iogearbox.net, alexander.h.duyck@intel.com, simon.horman@netronome.com, mlxsw@mellanox.com To: netdev@vger.kernel.org Return-path: Received: from mail-wr0-f194.google.com ([209.85.128.194]:35144 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932311AbdEOIjI (ORCPT ); Mon, 15 May 2017 04:39:08 -0400 Received: by mail-wr0-f194.google.com with SMTP id g12so14134530wrg.2 for ; Mon, 15 May 2017 01:39:07 -0700 (PDT) In-Reply-To: <20170515083857.3615-1-jiri@resnulli.us> Sender: netdev-owner@vger.kernel.org List-ID: From: Jiri Pirko Call the helper from the function rather than to always adjust the return value of the function. Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 0e49e6e..72624fa 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, @@ -405,7 +405,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, } 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); -- 2.9.3