lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [EXT] [PATCH] DMA/qedr: Use true and false for bool variable
Date
> From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Sent: Wednesday, February 10, 2021 11:38 AM
>
> ----------------------------------------------------------------------
> 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.
>
> Reported-by: Abaci Robot<abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/infiniband/hw/qedr/qedr.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/infiniband/hw/qedr/qedr.h
> b/drivers/infiniband/hw/qedr/qedr.h
> index 9dde703..3cb4feb 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 *
> --
> 1.8.3.1

Thanks, 

Acked-by: Michal Kalderon <michal.kalderon@marvell.com>


\
 
 \ /
  Last update: 2021-02-10 11:00    [W:0.065 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site