[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1544690603-5738-1-git-send-email-xiangxia.m.yue@gmail.com>
Date: Thu, 13 Dec 2018 00:43:23 -0800
From: xiangxia.m.yue@...il.com
To: netdev@...r.kernel.org, xiyou.wangcong@...il.com
Cc: Tonghao Zhang <xiangxia.m.yue@...il.com>
Subject: [PATCH] net: sched: simplify the qdisc_leaf code
From: Tonghao Zhang <xiangxia.m.yue@...il.com>
Except for returning, the var leaf is not
used in the qdisc_leaf(). For simplicity, remove it.
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@...il.com>
---
net/sched/sch_api.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 9c88cec..187a57e 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -335,7 +335,6 @@ struct Qdisc *qdisc_lookup_rcu(struct net_device *dev, u32 handle)
static struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
{
unsigned long cl;
- struct Qdisc *leaf;
const struct Qdisc_class_ops *cops = p->ops->cl_ops;
if (cops == NULL)
@@ -344,8 +343,7 @@ static struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
if (cl == 0)
return NULL;
- leaf = cops->leaf(p, cl);
- return leaf;
+ return cops->leaf(p, cl);
}
/* Find queueing discipline by name */
--
1.8.3.1
Powered by blists - more mailing lists