RDMA/qedr: Use true and false for bool variable
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Wed, 10 Feb 2021 09:38:21 +0000 (17:38 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 16 Feb 2021 18:42:58 +0000 (14:42 -0400)
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>
drivers/infiniband/hw/qedr/qedr.h

index 9dde70373a5539d63e4cea6ab5adfab4f7bf4a97..3cb4febaad0fa7b35b769b3f05fccf61e0df11ff 100644 (file)
@@ -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 *