drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c: fix build with gcc-4.4.4
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 31 Mar 2017 20:09:41 +0000 (13:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Apr 2017 02:32:57 +0000 (19:32 -0700)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c: In function 'mlx5e_set_rxfh':
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1067: error: unknown field 'rss' specified in initializer
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1067: warning: missing braces around initializer
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1067: warning: (near initialization for 'rrp.<anonymous>')
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1068: error: unknown field 'rss' specified in initializer
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1069: warning: excess elements in struct initializer
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:1069: warning: (near initialization for 'rrp')

gcc-4.4.4 has issues with anonymous union initializers.  Work around this.

Cc: Saeed Mahameed <saeedm@mellanox.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 40912937d2114c08327dd06bb854abd470bc4160..af039b6c0799d4f2e988ce91939ed388dca86375 100644 (file)
@@ -1064,8 +1064,12 @@ static int mlx5e_set_rxfh(struct net_device *dev, const u32 *indir,
                        u32 rqtn = priv->indir_rqt.rqtn;
                        struct mlx5e_redirect_rqt_param rrp = {
                                .is_rss = true,
-                               .rss.hfunc = priv->channels.params.rss_hfunc,
-                               .rss.channels  = &priv->channels
+                               {
+                                       .rss = {
+                                               .hfunc = priv->channels.params.rss_hfunc,
+                                               .channels  = &priv->channels,
+                                       },
+                               },
                        };
 
                        mlx5e_redirect_rqt(priv, rqtn, MLX5E_INDIR_RQT_SIZE, rrp);