[ewg] [PATCH] mlx4: Fix bug in mlx4_ib_mcg_attach
Eli Cohen
eli at mellanox.co.il
Tue Dec 8 07:14:05 PST 2009
The "!" operator has precedence over the "&" operator so parenthesis are
required to properly evaluate the user's loopback requirement.
Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
drivers/infiniband/hw/mlx4/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index 0f6ef38..736eea0 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -586,8 +586,8 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
struct mlx4_ib_dev *mdev = to_mdev(ibqp->device);
struct mlx4_ib_qp *mqp = to_mqp(ibqp);
- err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, !!mqp->flags &
- MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK);
+ err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, !!(mqp->flags &
+ MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK));
if (err)
return err;
--
1.6.5.5
More information about the ewg
mailing list