aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorEyal Perry2014-03-02 10:25:03 +0200
committerDavid S. Miller2014-03-02 20:04:01 -0500
commit28d222bbaa5122fb4bb0e607e39ab149a010e587 (patch)
treecbad404a3d3360f19148d5076fd2a251a669030d /drivers/net
parent313c2d375b1c9b648d9d4b96ec1b8185ac6a78c5 (diff)
net/mlx4_core: Fix sparse warning
This patch force conversion to u32 to fix the following sparse warning: drivers/net/ethernet/mellanox/mlx4/fw.c:1822:53: warning: restricted __be32 degrades to integer Casting to u32 is safe here, because token will be returned as is from the hardware without any modification. Signed-off-by: Eyal Perry <eyalpe@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/fw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c
index 91b69ff4b4a2..9cdf452140da 100644
--- a/drivers/net/ethernet/mellanox/mlx4/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx4/fw.c
@@ -1890,7 +1890,8 @@ void mlx4_opreq_action(struct work_struct *work)
err = EINVAL;
break;
}
- err = mlx4_cmd(dev, 0, ((u32) err | cpu_to_be32(token) << 16),
+ err = mlx4_cmd(dev, 0, ((u32) err |
+ (__force u32)cpu_to_be32(token) << 16),
1, MLX4_CMD_GET_OP_REQ, MLX4_CMD_TIME_CLASS_A,
MLX4_CMD_NATIVE);
if (err) {