[-next] net: sched: choke: remove some dead code
diff mbox

Message ID 20170403181629.GA22938@mwanda
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Dan Carpenter April 3, 2017, 6:18 p.m. UTC
We accidentally left this dead code behind after commit 5952fde10c35
("net: sched: choke: remove dead filter classify code").

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Jiri Pirko April 3, 2017, 6:37 p.m. UTC | #1
Mon, Apr 03, 2017 at 08:18:41PM CEST, dan.carpenter@oracle.com wrote:
>We accidentally left this dead code behind after commit 5952fde10c35
>("net: sched: choke: remove dead filter classify code").
>
>Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Jiri Pirko <jiri@mellanox.com>
David Miller April 5, 2017, 1:54 p.m. UTC | #2
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 3 Apr 2017 21:18:41 +0300

> We accidentally left this dead code behind after commit 5952fde10c35
> ("net: sched: choke: remove dead filter classify code").
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

Patch
diff mbox

diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
index 040625fdc82b..f11f8732b0d5 100644
--- a/net/sched/sch_choke.c
+++ b/net/sched/sch_choke.c
@@ -223,7 +223,6 @@  static bool choke_match_random(const struct choke_sched_data *q,
 static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch,
 			 struct sk_buff **to_free)
 {
-	int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
 	struct choke_sched_data *q = qdisc_priv(sch);
 	const struct red_parms *p = &q->parms;
 
@@ -290,11 +289,6 @@  static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch,
 congestion_drop:
 	qdisc_drop(skb, sch, to_free);
 	return NET_XMIT_CN;
-
-	if (ret & __NET_XMIT_BYPASS)
-		qdisc_qstats_drop(sch);
-	__qdisc_drop(skb, to_free);
-	return ret;
 }
 
 static struct sk_buff *choke_dequeue(struct Qdisc *sch)