• Amir Vadai's avatar
    net/mlx4_en: Use union for BlueFlame WQE · ec570940
    Amir Vadai authored
    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: default avatarAmir Vadai <amirv@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ec570940
qp.h 10.5 KB