mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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. Signed-off-by: Andrea Parri <parri.andrea@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
68946159da
commit
a55e1c5c26
@ -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)
|
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;
|
q->wsum -= agg->class_weight;
|
||||||
if (q->wsum != 0)
|
if (q->wsum != 0)
|
||||||
q->iwsum = ONE_FP / q->wsum;
|
q->iwsum = ONE_FP / q->wsum;
|
||||||
|
Loading…
Reference in New Issue
Block a user