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: <20220512141108.GC63055@ziepe.ca>
Date:   Thu, 12 May 2022 11:11:08 -0300
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     Guo Zhengkui <guozhengkui@...o.com>
Cc:     Potnuri Bharat Teja <bharat@...lsio.com>,
        Leon Romanovsky <leon@...nel.org>,
        Bernard Metzler <bmt@...ich.ibm.com>,
        "open list:CXGB4 IWARP RNIC DRIVER (IW_CXGB4)" 
        <linux-rdma@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        zhengkui_guo@...look.com
Subject: Re: [PATCH] RDMA: replace ternary operator with min()

On Thu, May 12, 2022 at 09:58:37PM +0800, Guo Zhengkui wrote:
> Fix the following coccicheck warnings:
> 
> drivers/infiniband/sw/siw/siw_cm.c:1326:11-12: WARNING opportunity for min()
> drivers/infiniband/sw/siw/siw_cm.c:488:11-12: WARNING opportunity for min()
> drivers/infiniband/hw/cxgb4/cm.c:217:14-15: WARNING opportunity for min()
> drivers/infiniband/hw/cxgb4/cm.c:232:14-15: WARNING opportunity for min()
> 
> min() macro is defined in include/linux/minmax.h. It avoids multiple
> evaluations of the arguments when non-constant and performs strict
> type-checking.

no, these are all error return patterns, if you want to change them to
something change them to

if (error < 0)
   return error;
return 0;

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ