From mboxrd@z Thu Jan 1 00:00:00 1970 From: Corey Hickey Subject: [PATCH 3/7] Move two functions. Date: Sun, 29 Jul 2007 00:08:50 -0700 Message-ID: <11856929352115-git-send-email-bugfood-ml@fatooh.org> References: <11856929352537-git-send-email-bugfood-ml@fatooh.org> <11856929353322-git-send-email-bugfood-ml@fatooh.org> <11856929352132-git-send-email-bugfood-ml@fatooh.org> Cc: Corey Hickey To: netdev@vger.kernel.org Return-path: Received: from hot.fatooh.org ([208.78.103.127]:60046 "EHLO hot.fatooh.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757570AbXG2HIx (ORCPT ); Sun, 29 Jul 2007 03:08:53 -0400 In-Reply-To: <11856929352132-git-send-email-bugfood-ml@fatooh.org> Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Move sfq_q_destroy() to above sfq_q_init() so that it can be used by an error case in a later patch. Move sfq_destroy() as well, for clarity. Signed-off-by: Corey Hickey --- net/sched/sch_sfq.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 0c46938..583f925 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -380,6 +380,17 @@ static void sfq_perturbation(unsigned long arg) } } +static void sfq_q_destroy(struct sfq_sched_data *q) +{ + del_timer(&q->perturb_timer); +} + +static void sfq_destroy(struct Qdisc *sch) +{ + struct sfq_sched_data *q = qdisc_priv(sch); + sfq_q_destroy(q); +} + static int sfq_q_init(struct sfq_sched_data *q, struct rtattr *opt) { struct tc_sfq_qopt *ctl = RTA_DATA(opt); @@ -420,7 +431,7 @@ static int sfq_init(struct Qdisc *sch, struct rtattr *opt) { struct sfq_sched_data *q = qdisc_priv(sch); int err; - + q->quantum = psched_mtu(sch->dev); /* default */ if ((err = sfq_q_init(q, opt))) return err; @@ -436,17 +447,6 @@ static int sfq_init(struct Qdisc *sch, struct rtattr *opt) return 0; } -static void sfq_q_destroy(struct sfq_sched_data *q) -{ - del_timer(&q->perturb_timer); -} - -static void sfq_destroy(struct Qdisc *sch) -{ - struct sfq_sched_data *q = qdisc_priv(sch); - sfq_q_destroy(q); -} - static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb) { struct sfq_sched_data *q = qdisc_priv(sch); -- 1.5.2.4