Skip to contentSkip to conversation

pkt_sched: sch_qfq: remove redundant -if- control statement

PATCH Superseded Andrea Parri 2 participants 2 messages Jun 15, 2015 – Jun 16, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkt_sched: sch_qfq: remove redundant -if- control statement

The control !hlist_unhashed() in qfq_destroy_agg() is unnecessary because already performed in hlist_del_init(), so remove it.

---
 net/sched/sch_qfq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/sched/sch_qfq.c +1 -2
index 3ec7e88..b8d73bc 100644
@@ -339,8 +339,7 @@ static struct qfq_aggregate *qfq_choose_next_agg(struct qfq_sched *);
 
 static void qfq_destroy_agg(struct qfq_sched *q, struct qfq_aggregate *agg)
 {
-       if (!hlist_unhashed(&agg->nonfull_next))
-               hlist_del_init(&agg->nonfull_next);
+       hlist_del_init(&agg->nonfull_next);
        q->wsum -= agg->class_weight;
        if (q->wsum != 0)
                q->iwsum = ONE_FP / q->wsum;
maintainer
#1 lore raw

From: Andrea Parri <[email protected]>
Date: Mon, 15 Jun 2015 14:20:01 +0200

Quoted 4 lines

The control !hlist_unhashed() in qfq_destroy_agg() is unnecessary because already performed in hlist_del_init(), so remove it.

This patch has been corrupted by your email client (TAB characters have been transformed into sequences of SPACEs, etc.)

Please fix this up and resubmit.