Skip to content

Commit 1a93e84

Browse files
Jiapeng Chongjgunthorpe
authored andcommitted
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<[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Acked-by: Michal Kalderon <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent bf656b0 commit 1a93e84

File tree

1 file changed

+4
-4
lines changed
  • drivers/infiniband/hw/qedr

1 file changed

+4
-4
lines changed

drivers/infiniband/hw/qedr/qedr.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,18 +617,18 @@ static inline bool qedr_qp_has_srq(struct qedr_qp *qp)
617617
static inline bool qedr_qp_has_sq(struct qedr_qp *qp)
618618
{
619619
if (qp->qp_type == IB_QPT_GSI || qp->qp_type == IB_QPT_XRC_TGT)
620-
return 0;
620+
return false;
621621

622-
return 1;
622+
return true;
623623
}
624624

625625
static inline bool qedr_qp_has_rq(struct qedr_qp *qp)
626626
{
627627
if (qp->qp_type == IB_QPT_GSI || qp->qp_type == IB_QPT_XRC_INI ||
628628
qp->qp_type == IB_QPT_XRC_TGT || qedr_qp_has_srq(qp))
629-
return 0;
629+
return false;
630630

631-
return 1;
631+
return true;
632632
}
633633

634634
static inline struct qedr_user_mmap_entry *

0 commit comments

Comments
 (0)