mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Guo Zhengkui <guozhengkui@vivo.com>
Cc: Potnuri Bharat Teja <bharat@chelsio.com>,
	Leon Romanovsky <leon@kernel.org>,
	Bernard Metzler <bmt@zurich.ibm.com>,
	"open list:CXGB4 IWARP RNIC DRIVER (IW_CXGB4)" 
	<linux-rdma@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	zhengkui_guo@outlook.com
Subject: Re: [PATCH] RDMA: replace ternary operator with min()
Date: Thu, 12 May 2022 11:11:08 -0300	[thread overview]
Message-ID: <20220512141108.GC63055@ziepe.ca> (raw)
In-Reply-To: <20220512135837.41089-1-guozhengkui@vivo.com>

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

  reply	other threads:[~2022-05-12 14:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 13:58 Guo Zhengkui
2022-05-12 14:11 ` Jason Gunthorpe [this message]
2022-05-12 14:39   ` Guo Zhengkui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220512141108.GC63055@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=bharat@chelsio.com \
    --cc=bmt@zurich.ibm.com \
    --cc=guozhengkui@vivo.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=zhengkui_guo@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®