| 1 | From b49ab5f6bb7e609190065cb9a605de809e50ab60 Mon Sep 17 00:00:00 2001 |
| 2 | From: Sasha Levin <levinsasha928@gmail.com> |
| 3 | Date: Mon, 14 May 2012 11:57:06 +0000 |
| 4 | Subject: [PATCH] net: codel: fix build errors |
| 5 | |
| 6 | commit 669d67bf777def468970f2dcba1537edf3b2d329 upstream. |
| 7 | |
| 8 | Fix the following build error: |
| 9 | |
| 10 | net/sched/sch_fq_codel.c: In function 'fq_codel_dump_stats': |
| 11 | net/sched/sch_fq_codel.c:464:3: error: unknown field 'qdisc_stats' specified in initializer |
| 12 | net/sched/sch_fq_codel.c:464:3: warning: missing braces around initializer |
| 13 | net/sched/sch_fq_codel.c:464:3: warning: (near initialization for 'st.<anonymous>') |
| 14 | net/sched/sch_fq_codel.c:465:3: error: unknown field 'qdisc_stats' specified in initializer |
| 15 | net/sched/sch_fq_codel.c:465:3: warning: excess elements in struct initializer |
| 16 | net/sched/sch_fq_codel.c:465:3: warning: (near initialization for 'st') |
| 17 | net/sched/sch_fq_codel.c:466:3: error: unknown field 'qdisc_stats' specified in initializer |
| 18 | net/sched/sch_fq_codel.c:466:3: warning: excess elements in struct initializer |
| 19 | net/sched/sch_fq_codel.c:466:3: warning: (near initialization for 'st') |
| 20 | net/sched/sch_fq_codel.c:467:3: error: unknown field 'qdisc_stats' specified in initializer |
| 21 | net/sched/sch_fq_codel.c:467:3: warning: excess elements in struct initializer |
| 22 | net/sched/sch_fq_codel.c:467:3: warning: (near initialization for 'st') |
| 23 | make[1]: *** [net/sched/sch_fq_codel.o] Error 1 |
| 24 | |
| 25 | Signed-off-by: Sasha Levin <levinsasha928@gmail.com> |
| 26 | Signed-off-by: David S. Miller <davem@davemloft.net> |
| 27 | --- |
| 28 | net/sched/sch_fq_codel.c | 9 +++++---- |
| 29 | 1 file changed, 5 insertions(+), 4 deletions(-) |
| 30 | |
| 31 | --- a/net/sched/sch_fq_codel.c |
| 32 | +++ b/net/sched/sch_fq_codel.c |
| 33 | @@ -461,13 +461,14 @@ static int fq_codel_dump_stats(struct Qd |
| 34 | struct fq_codel_sched_data *q = qdisc_priv(sch); |
| 35 | struct tc_fq_codel_xstats st = { |
| 36 | .type = TCA_FQ_CODEL_XSTATS_QDISC, |
| 37 | - .qdisc_stats.maxpacket = q->cstats.maxpacket, |
| 38 | - .qdisc_stats.drop_overlimit = q->drop_overlimit, |
| 39 | - .qdisc_stats.ecn_mark = q->cstats.ecn_mark, |
| 40 | - .qdisc_stats.new_flow_count = q->new_flow_count, |
| 41 | }; |
| 42 | struct list_head *pos; |
| 43 | |
| 44 | + st.qdisc_stats.maxpacket = q->cstats.maxpacket; |
| 45 | + st.qdisc_stats.drop_overlimit = q->drop_overlimit; |
| 46 | + st.qdisc_stats.ecn_mark = q->cstats.ecn_mark; |
| 47 | + st.qdisc_stats.new_flow_count = q->new_flow_count; |
| 48 | + |
| 49 | list_for_each(pos, &q->new_flows) |
| 50 | st.qdisc_stats.new_flows_len++; |
| 51 | |
| 52 | |