Commit 2ab367a7 authored by zhengbin's avatar zhengbin Committed by Jason Gunthorpe

RDMA/mlx5: use true,false for bool variable

Fixes coccicheck warning:

drivers/infiniband/hw/mlx5/mr.c:150:2-26: WARNING: Assignment of 0/1 to bool variable
drivers/infiniband/hw/mlx5/mr.c:1455:2-26: WARNING: Assignment of 0/1 to bool variable
drivers/infiniband/hw/mlx5/qp.c:1874:6-20: WARNING: Assignment of 0/1 to bool variable

Link: https://lore.kernel.org/r/1577176812-2238-6-git-send-email-zhengbin13@huawei.comReported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarzhengbin <zhengbin13@huawei.com>
Acked-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent cf368beb
...@@ -147,7 +147,7 @@ static int add_keys(struct mlx5_ib_dev *dev, int c, int num) ...@@ -147,7 +147,7 @@ static int add_keys(struct mlx5_ib_dev *dev, int c, int num)
break; break;
} }
mr->order = ent->order; mr->order = ent->order;
mr->allocated_from_cache = 1; mr->allocated_from_cache = true;
mr->dev = dev; mr->dev = dev;
MLX5_SET(mkc, mkc, free, 1); MLX5_SET(mkc, mkc, free, 1);
...@@ -1440,7 +1440,7 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start, ...@@ -1440,7 +1440,7 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
goto err; goto err;
} }
mr->allocated_from_cache = 0; mr->allocated_from_cache = false;
} else { } else {
/* /*
* Send a UMR WQE * Send a UMR WQE
......
...@@ -1871,7 +1871,7 @@ static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev, ...@@ -1871,7 +1871,7 @@ static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev,
{ {
enum ib_qp_type qpt = init_attr->qp_type; enum ib_qp_type qpt = init_attr->qp_type;
int scqe_sz; int scqe_sz;
bool allow_scat_cqe = 0; bool allow_scat_cqe = false;
if (qpt == IB_QPT_UC || qpt == IB_QPT_UD) if (qpt == IB_QPT_UC || qpt == IB_QPT_UD)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment