]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Use union for BlueFlame WQE
authorAmir Vadai <amirv@mellanox.com>
Sun, 2 Mar 2014 08:25:04 +0000 (10:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Mar 2014 01:04:01 +0000 (20:04 -0500)
commitaa9287346a34a904e0f023c597e0a71d6e1f4db5
treec43daac50a67323df5b6f925ec17ce68f3e2a59f
parente75d2e2c11ed0e68f041cbc6d8e0dae7420c53f6
net/mlx4_en: Use union for BlueFlame WQE

When BlueFlame is turned on, control segment of the TX WQE is changed,
and the second line of it is used for QPN.
Changed code to use a union in the mlx4_wqe_ctrl_seg instead of casting.
This makes the code clearer and solves the static checker warning:

drivers/net/ethernet/mellanox/mlx4/en_tx.c:839 mlx4_en_xmit()
warn: potential memory corrupting cast 4 vs 2 bytes

CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c
include/linux/mlx4/qp.h