From: Andrew Morton Date: Fri, 19 Jan 2018 00:30:49 +0000 (-0800) Subject: net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues X-Git-Tag: v4.19~1702^2~129 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef58ca38dbda0642e293bcaa2e05edc79677c617;p=platform%2Fkernel%2Flinux-rpi3.git 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: 7fdb61b44c0c95 ("net: sch: prio: Add offload ability to PRIO qdisc") Cc: Nogah Frankel Cc: Yuval Mintz Cc: Jiri Pirko Cc: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index a398502..efbf51f 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c @@ -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;