Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1166455 > unrolled thread

[PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement

Started byAndrea Parri <parri.andrea@gmail.com>
First post2015-06-17 00:30 +0200
Last post2015-06-21 18:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement Andrea Parri <parri.andrea@gmail.com> - 2015-06-17 00:30 +0200
    Re: [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if-  control statement David Miller <davem@davemloft.net> - 2015-06-21 18:40 +0200

#1166455 — [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement

FromAndrea Parri <parri.andrea@gmail.com>
Date2015-06-17 00:30 +0200
Subject[PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement
Message-ID<pC7wK-7uK-27@gated-at.bofh.it>
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>
---
 net/sched/sch_qfq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c
index 3ec7e88..b8d73bc 100644
--- a/net/sched/sch_qfq.c
+++ b/net/sched/sch_qfq.c
@@ -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;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1169615 — Re: [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement

FromDavid Miller <davem@davemloft.net>
Date2015-06-21 18:40 +0200
SubjectRe: [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement
Message-ID<pDQrM-24S-27@gated-at.bofh.it>
In reply to#1166455
From: Andrea Parri <parri.andrea@gmail.com>
Date: Wed, 17 Jun 2015 00:16:59 +0200

> 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>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web