From: Joe Perches <joe@perches.com>
To: YANG LI <abaci-bugfix@linux.alibaba.com>, davem@davemloft.net
Cc: kuba@kernel.org, dchickles@marvell.com, sburla@marvell.com,
fmanlunas@marvell.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] liquidio: style: Identical condition and return expression 'retval', return value is always 0.
Date: Tue, 29 Dec 2020 22:28:42 -0800 [thread overview]
Message-ID: <1863fac248a37a92d9bacc4992caafecdcdac0dc.camel@perches.com> (raw)
In-Reply-To: <1609308450-50695-1-git-send-email-abaci-bugfix@linux.alibaba.com>
On Wed, 2020-12-30 at 14:07 +0800, YANG LI wrote:
> The warning was because of the following line in function
> liquidio_set_fec():
>
> retval = wait_for_sc_completion_timeout(oct, sc, 0);
> if (retval)
> return (-EIO);
I presume abaci is a robot
Perhaps also the robot could look for code immediately above this like:
oct->props[lio->ifidx].fec = var;
if (resp->fec_setting == SEAPI_CMD_FEC_SET_RS)
oct->props[lio->ifidx].fec = 1;
else
oct->props[lio->ifidx].fec = 0;
where a location is immediately overwritten.
so the line
oct->props[lio->ifidx].fec = var;
could be highlighted and perhaps removed
and also perhaps the second test and set block could be written
oct->props[lio->ifidx].fec = resp->fec_setting == SEAPI_CMD_FEC_SET_RS;
next prev parent reply other threads:[~2020-12-30 6:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 6:07 YANG LI
2020-12-30 6:28 ` Joe Perches [this message]
2021-01-05 23:58 ` David Miller
2020-12-30 6:10 YANG LI
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=1863fac248a37a92d9bacc4992caafecdcdac0dc.camel@perches.com \
--to=joe@perches.com \
--cc=abaci-bugfix@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dchickles@marvell.com \
--cc=fmanlunas@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sburla@marvell.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
Powered by JetHome