From patchwork Fri Jan 19 00:30:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 863240 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zN1vh0skpz9s7f for ; Fri, 19 Jan 2018 11:30:56 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754976AbeASAay (ORCPT ); Thu, 18 Jan 2018 19:30:54 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:57146 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753476AbeASAau (ORCPT ); Thu, 18 Jan 2018 19:30:50 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.92]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0C0B3EC7; Fri, 19 Jan 2018 00:30:50 +0000 (UTC) Date: Thu, 18 Jan 2018 16:30:49 -0800 From: akpm@linux-foundation.org To: davem@davemloft.net, netdev@vger.kernel.org, akpm@linux-foundation.org, jiri@mellanox.com, nogahf@mellanox.com, yuvalm@mellanox.com Subject: [patch 1/1] net/sched/sch_prio.c: work around gcc-4.4.4 union initializer issues Message-ID: <5a613c39.I6YhgqiMqaeHZDa2%akpm@linux-foundation.org> User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Andrew Morton Subject: 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 --- net/sched/sch_prio.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff -puN net/sched/sch_prio.c~net-sched-sch_prioc-work-around-gcc-444-union-initializer-issues net/sched/sch_prio.c --- a/net/sched/sch_prio.c~net-sched-sch_prioc-work-around-gcc-444-union-initializer-issues +++ a/net/sched/sch_prio.c @@ -254,11 +254,15 @@ static int prio_dump_offload(struct Qdis { 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;