diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2012-03-06 08:04:07 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-07 00:19:17 +0400 |
commit | 39b2c4ebb433acf751c28a59dde110767af24d23 (patch) | |
tree | cf278e754cfffb95da835fb986f4cc4cedb0f32b /drivers/net/ethernet/mellanox | |
parent | 966684d581c9c04202e6612a792e36ae7bc5fd59 (diff) | |
download | linux-39b2c4ebb433acf751c28a59dde110767af24d23.tar.xz |
net/mlx4: fix sparse warnings on wrong type for RSS keys
The keys used for the hardware RSS topelitz hash are of type __be32
where the values provided by the driver are from array of u32,
this triggered sparse warning on incorrect type in assignment as of different base types.
Since these values are picked randomly,
the fix is to transform the key to __be32 by executing cpu_to_be_32()
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index c881712b7492..9adbd53da525 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c @@ -910,7 +910,7 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv) rss_context->flags = rss_mask; rss_context->hash_fn = MLX4_RSS_HASH_TOP; for (i = 0; i < 10; i++) - rss_context->rss_key[i] = rsskey[i]; + rss_context->rss_key[i] = cpu_to_be32(rsskey[i]); err = mlx4_qp_to_ready(mdev->dev, &priv->res.mtt, &context, &rss_map->indir_qp, &rss_map->indir_state); |