diff options
author | Ilan Tayari <ilant@mellanox.com> | 2017-07-02 07:38:14 -0400 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2017-07-06 08:13:20 -0400 |
commit | 2a41d15b7906e8f749d3656e1bdc2a5ee7dd65ff (patch) | |
tree | c8a7252b5fcf75a29314ec431638d1393f8c4a96 | |
parent | c8af01692e4950504fb2e5c65ca87acbe73027cb (diff) |
net/mlx5: FPGA, Fix datatype mismatch
Fix warnings when building with -Wall:
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:313:36: warning: cast to restricted __be32
drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c:314:37: warning: cast to restricted __be32
Fixes: bebb23e6cb02 ("net/mlx5: Accel, Add IPSec acceleration interface")
Reported-by: Or Gerlitz <gerlitz.or@gmail.com>
Signed-off-by: Ilan Tayari <ilant@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c index 42970e2a05ff..35d0e33381ca 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | |||
@@ -275,7 +275,7 @@ int mlx5_fpga_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters, | |||
275 | { | 275 | { |
276 | struct mlx5_fpga_device *fdev = mdev->fpga; | 276 | struct mlx5_fpga_device *fdev = mdev->fpga; |
277 | unsigned int i; | 277 | unsigned int i; |
278 | u32 *data; | 278 | __be32 *data; |
279 | u32 count; | 279 | u32 count; |
280 | u64 addr; | 280 | u64 addr; |
281 | int ret; | 281 | int ret; |
@@ -290,7 +290,7 @@ int mlx5_fpga_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters, | |||
290 | 290 | ||
291 | count = mlx5_fpga_ipsec_counters_count(mdev); | 291 | count = mlx5_fpga_ipsec_counters_count(mdev); |
292 | 292 | ||
293 | data = kzalloc(sizeof(u32) * count * 2, GFP_KERNEL); | 293 | data = kzalloc(sizeof(*data) * count * 2, GFP_KERNEL); |
294 | if (!data) { | 294 | if (!data) { |
295 | ret = -ENOMEM; | 295 | ret = -ENOMEM; |
296 | goto out; | 296 | goto out; |