From: Colin Ian King <colin.king@canonical.com>
To: David Miller <davem@davemloft.net>
Cc: pavel.belous@aquantia.com, Dmitrii.Tarakanov@aquantia.com,
Alexander.Loktionov@aquantia.com, vomlehn@texas.net,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ethernet: aquantia: remove redundant checks on error status
Date: Thu, 11 May 2017 19:18:08 +0100 [thread overview]
Message-ID: <174d4afe-16a8-cd2d-9be9-0f502cc89a59@canonical.com> (raw)
In-Reply-To: <20170511.141623.1200573443845531222.davem@davemloft.net>
On 11/05/17 19:16, David Miller wrote:
> From: Colin King <colin.king@canonical.com>
> Date: Thu, 11 May 2017 18:29:29 +0100
>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The error status err is initialized as zero and then being checked
>> several times to see if it is less than zero even when it has not
>> been updated. Since these checks are redundant we can remove these
>> as well as err and the error exit label err_exit.
>>
>> Detected by CoverityScan, CID#1398313 and CID#1398306 ("Logically
>> dead code")
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> Please enhance your commit message to also explain that the functions
> being called around these checks all return void, to make it clear
> that this isn't an issue of the return values not being checked.
>
> Thanks.
>
Good idea. Will do.
prev parent reply other threads:[~2017-05-11 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 17:29 [PATCH] ethernet: aquantia: remove redundant checks on error status Colin King
2017-05-11 18:16 ` David Miller
2017-05-11 18:18 ` Colin Ian King [this message]
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=174d4afe-16a8-cd2d-9be9-0f502cc89a59@canonical.com \
--to=colin.king@canonical.com \
--cc=Alexander.Loktionov@aquantia.com \
--cc=Dmitrii.Tarakanov@aquantia.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pavel.belous@aquantia.com \
--cc=vomlehn@texas.net \
/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;
as well as URLs for NNTP newsgroup(s).