Commit ef58ca38 authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues

gcc-4.4.4 has problems witn anon union initializers.  Work around this.

net/sched/sch_prio.c: In function 'prio_dump_offload':
net/sched/sch_prio.c:260: error: unknown field 'stats' specified in initializer
net/sched/sch_prio.c:260: warning: initialization makes integer from pointer without a cast
net/sched/sch_prio.c:261: error: unknown field 'stats' specified in initializer
net/sched/sch_prio.c:261: warning: initialization makes integer from pointer without a cast

Fixes: 7fdb61b4 ("net: sch: prio: Add offload ability to PRIO qdisc")
Cc: Nogah Frankel <nogahf@mellanox.com>
Cc: Yuval Mintz <yuvalm@mellanox.com>
Cc: Jiri Pirko <jiri@mellanox.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 89290b83
...@@ -254,11 +254,15 @@ static int prio_dump_offload(struct Qdisc *sch) ...@@ -254,11 +254,15 @@ static int prio_dump_offload(struct Qdisc *sch)
{ {
struct net_device *dev = qdisc_dev(sch); struct net_device *dev = qdisc_dev(sch);
struct tc_prio_qopt_offload hw_stats = { struct tc_prio_qopt_offload hw_stats = {
.command = TC_PRIO_STATS,
.handle = sch->handle, .handle = sch->handle,
.parent = sch->parent, .parent = sch->parent,
.command = TC_PRIO_STATS, {
.stats.bstats = &sch->bstats, .stats = {
.stats.qstats = &sch->qstats, .bstats = &sch->bstats,
.qstats = &sch->qstats,
},
},
}; };
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment