All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement
@ 2015-06-16 22:16 Andrea Parri
  2015-06-21 16:48   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Andrea Parri @ 2015-06-16 22:16 UTC (permalink / raw
  To: jhs, davem; +Cc: paolo.valente, netdev, linux-kernel, Andrea Parri

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement
  2015-06-16 22:16 [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement Andrea Parri
@ 2015-06-21 16:48   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2015-06-21 16:48 UTC (permalink / raw
  To: parri.andrea; +Cc: jhs, paolo.valente, netdev, linux-kernel

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement
@ 2015-06-21 16:48   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2015-06-21 16:48 UTC (permalink / raw
  To: parri.andrea; +Cc: jhs, paolo.valente, netdev, linux-kernel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-21 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-16 22:16 [PATCH RESEND] pkt_sched: sch_qfq: remove redundant -if- control statement Andrea Parri
2015-06-21 16:48 ` David Miller
2015-06-21 16:48   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.