From: zhengbin <zhengbin13@huawei.com>
To: <bmt@zurich.ibm.com>, <dledford@redhat.com>, <jgg@ziepe.ca>,
<linux-rdma@vger.kernel.org>
Cc: <zhengbin13@huawei.com>
Subject: [PATCH 5/5] RDMA/mlx5: use true,false for bool variable
Date: Tue, 24 Dec 2019 16:40:12 +0800 [thread overview]
Message-ID: <1577176812-2238-6-git-send-email-zhengbin13@huawei.com> (raw)
In-Reply-To: <1577176812-2238-1-git-send-email-zhengbin13@huawei.com>
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
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/infiniband/hw/mlx5/mr.c | 4 ++--
drivers/infiniband/hw/mlx5/qp.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index ea8bfc3..3f6c177 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -147,7 +147,7 @@ static int add_keys(struct mlx5_ib_dev *dev, int c, int num)
break;
}
mr->order = ent->order;
- mr->allocated_from_cache = 1;
+ mr->allocated_from_cache = true;
mr->dev = dev;
MLX5_SET(mkc, mkc, free, 1);
@@ -1452,7 +1452,7 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
goto err;
}
- mr->allocated_from_cache = 0;
+ mr->allocated_from_cache = false;
} else {
/*
* Send a UMR WQE
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 7e51870..04126ef 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1871,7 +1871,7 @@ static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev,
{
enum ib_qp_type qpt = init_attr->qp_type;
int scqe_sz;
- bool allow_scat_cqe = 0;
+ bool allow_scat_cqe = false;
if (qpt == IB_QPT_UC || qpt == IB_QPT_UD)
return;
--
2.7.4
next prev parent reply other threads:[~2019-12-24 8:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-24 8:40 [PATCH 0/5] RDMA: use true,false for bool variable zhengbin
2019-12-24 8:40 ` [PATCH 1/5] RDMA/siw: " zhengbin
2019-12-24 9:50 ` Leon Romanovsky
2019-12-24 8:40 ` [PATCH 2/5] IB/hfi1: " zhengbin
2019-12-24 9:48 ` Leon Romanovsky
2019-12-24 8:40 ` [PATCH 3/5] IB/iser: " zhengbin
2019-12-24 8:40 ` [PATCH 4/5] RDMA/mlx4: " zhengbin
2019-12-24 9:48 ` Leon Romanovsky
2019-12-24 8:40 ` zhengbin [this message]
2019-12-24 9:48 ` [PATCH 5/5] RDMA/mlx5: " Leon Romanovsky
2020-01-03 23:15 ` [PATCH 0/5] RDMA: " Jason Gunthorpe
2020-01-04 17:25 ` Bernard Metzler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1577176812-2238-6-git-send-email-zhengbin13@huawei.com \
--to=zhengbin13@huawei.com \
--cc=bmt@zurich.ibm.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).