[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120514.175921.1196526858340183817.davem@davemloft.net>
Date: Mon, 14 May 2012 17:59:21 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: levinsasha928@...il.com
Cc: edumazet@...gle.com, dave.taht@...ferbloat.net,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2] net: codel: fix build errors
From: Sasha Levin <levinsasha928@...il.com>
Date: Mon, 14 May 2012 23:57:06 +0200
> Fix the following build error:
...
> Signed-off-by: Sasha Levin <levinsasha928@...il.com>
Applied, but:
> struct tc_fq_codel_xstats st = {
> .type = TCA_FQ_CODEL_XSTATS_QDISC,
> - .qdisc_stats.maxpacket = q->cstats.maxpacket,
> - .qdisc_stats.drop_overlimit = q->drop_overlimit,
> - .qdisc_stats.ecn_mark = q->cstats.ecn_mark,
> - .qdisc_stats.new_flow_count = q->new_flow_count,
> };
> struct list_head *pos;
>
> + st.qdisc_stats.maxpacket = q->cstats.maxpacket;
> + st.qdisc_stats.drop_overlimit = q->drop_overlimit;
> + st.qdisc_stats.ecn_mark = q->cstats.ecn_mark;
> + st.qdisc_stats.new_flow_count = q->new_flow_count;
> +
This is now a very inefficient initialization of this structure.
GCC is going to fill all the non-explictly-initialized fields with
zero, then we'll write to the same fields again in the st.qdisc*
assignments.
Eric please resolve this, I hate knowing we have code like this :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists