Skip to content

Commit

Permalink
pkt_sched: sch_qfq: remove redundant -if- control statement
Browse files Browse the repository at this point in the history
The control !hlist_unhashed() in qfq_destroy_agg() is unnecessary
because already performed in hlist_del_init(), so remove it.

Signed-off-by: Andrea Parri <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Andrea Parri authored and davem330 committed Jun 21, 2015
1 parent 6894615 commit a55e1c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/sched/sch_qfq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a55e1c5

Please sign in to comment.