lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR18MB3182287BFB84CA1C1AC7A367A18D9@MN2PR18MB3182.namprd18.prod.outlook.com>
Date:   Wed, 10 Feb 2021 09:55:28 +0000
From:   Michal Kalderon <mkalderon@...vell.com>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
CC:     Ariel Elior <aelior@...vell.com>,
        "dledford@...hat.com" <dledford@...hat.com>,
        "jgg@...pe.ca" <jgg@...pe.ca>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [EXT] [PATCH] DMA/qedr: Use true and false for bool variable

> From: Jiapeng Chong <jiapeng.chong@...ux.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@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.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@...vell.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ