Skip to content

Commit

Permalink
net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues
Browse files Browse the repository at this point in the history
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: 7fdb61b ("net: sch: prio: Add offload ability to PRIO qdisc")
Cc: Nogah Frankel <[email protected]>
Cc: Yuval Mintz <[email protected]>
Cc: Jiri Pirko <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
akpm00 authored and davem330 committed Jan 19, 2018
1 parent 89290b8 commit ef58ca3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions net/sched/sch_prio.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,15 @@ static int prio_dump_offload(struct Qdisc *sch)
{
struct net_device *dev = qdisc_dev(sch);
struct tc_prio_qopt_offload hw_stats = {
.command = TC_PRIO_STATS,
.handle = sch->handle,
.parent = sch->parent,
.command = TC_PRIO_STATS,
.stats.bstats = &sch->bstats,
.stats.qstats = &sch->qstats,
{
.stats = {
.bstats = &sch->bstats,
.qstats = &sch->qstats,
},
},
};
int err;

Expand Down

0 comments on commit ef58ca3

Please sign in to comment.