summary refs log tree commit diff
path: root/net/sched/sch_prio.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2018-01-18 16:30:49 -0800
committerDavid S. Miller <davem@davemloft.net>2018-01-18 21:11:31 -0500
commitef58ca38dbda0642e293bcaa2e05edc79677c617 (patch)
tree850780b7e5b6a563c727f6d45d891c1d550d83c7 /net/sched/sch_prio.c
parent89290b831ec1a0b233fdc7aaad84acdf4ebbf6aa (diff)
downloadlinux-ef58ca38dbda0642e293bcaa2e05edc79677c617.tar.gz
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 <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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_prio.c')
-rw-r--r--net/sched/sch_prio.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index a398502899a9..efbf51f35778 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;