diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-02-10 10:38:21 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-02-16 19:42:58 +0100 |
commit | 1a93e848b730abd048c9b0fd60c6efb4da64ac17 (patch) | |
tree | 3b763cb28bc88244df70f3e9ec0ab6f5aed34720 /drivers/infiniband | |
parent | RDMA/hns: Adjust definition of FRMR fields (diff) | |
download | linux-1a93e848b730abd048c9b0fd60c6efb4da64ac17.tar.xz linux-1a93e848b730abd048c9b0fd60c6efb4da64ac17.zip |
RDMA/qedr: Use true and false for bool variable
Fix the following coccicheck warning:
./drivers/infiniband/hw/qedr/qedr.h:629:9-10: WARNING: return of 0/1 in
function 'qedr_qp_has_rq' with return type bool.
./drivers/infiniband/hw/qedr/qedr.h:620:9-10: WARNING: return of 0/1 in
function 'qedr_qp_has_sq' with return type bool.
Link: https://lore.kernel.org/r/1612949901-109873-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Michal KalderonĀ <michal.kalderon@marvell.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/qedr/qedr.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h index 9dde70373a55..3cb4febaad0f 100644 --- a/drivers/infiniband/hw/qedr/qedr.h +++ b/drivers/infiniband/hw/qedr/qedr.h @@ -617,18 +617,18 @@ static inline bool qedr_qp_has_srq(struct qedr_qp *qp) static inline bool qedr_qp_has_sq(struct qedr_qp *qp) { if (qp->qp_type == IB_QPT_GSI || qp->qp_type == IB_QPT_XRC_TGT) - return 0; + return false; - return 1; + return true; } static inline bool qedr_qp_has_rq(struct qedr_qp *qp) { if (qp->qp_type == IB_QPT_GSI || qp->qp_type == IB_QPT_XRC_INI || qp->qp_type == IB_QPT_XRC_TGT || qedr_qp_has_srq(qp)) - return 0; + return false; - return 1; + return true; } static inline struct qedr_user_mmap_entry * |