From: Doug Ledford <dledford@redhat.com>
To: Colin King <colin.king@canonical.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
"J . Bruce Fields" <bfields@redhat.com>,
Chuck Lever <chuck.lever@oracle.com>,
linux-rdma@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/core: remove redundant check on prot_sg_cnt
Date: Mon, 09 Oct 2017 17:12:31 +0000 [thread overview]
Message-ID: <1507569151.46071.48.camel@redhat.com> (raw)
In-Reply-To: <20171009161200.4465-1-colin.king@canonical.com>
On Mon, 2017-10-09 at 17:12 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> prot_sg_cnt cannot be zero as a previous check on ret (from which
> prot_sg_cnt is assigned) returns -ENOMEM if is it zero. Since
> it cannot be zero we can simplify the code by removing the non
> -zero check on prot_sg_cnt and redundant else statement.
>
> Detected by CoverityScan, COD#1357188 ("Logically dead code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
WARNING: multiple messages have this Message-ID (diff)
From: Doug Ledford <dledford@redhat.com>
To: Colin King <colin.king@canonical.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
"J . Bruce Fields" <bfields@redhat.com>,
Chuck Lever <chuck.lever@oracle.com>,
linux-rdma@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IB/core: remove redundant check on prot_sg_cnt
Date: Mon, 09 Oct 2017 13:12:31 -0400 [thread overview]
Message-ID: <1507569151.46071.48.camel@redhat.com> (raw)
In-Reply-To: <20171009161200.4465-1-colin.king@canonical.com>
On Mon, 2017-10-09 at 17:12 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> prot_sg_cnt cannot be zero as a previous check on ret (from which
> prot_sg_cnt is assigned) returns -ENOMEM if is it zero. Since
> it cannot be zero we can simplify the code by removing the non
> -zero check on prot_sg_cnt and redundant else statement.
>
> Detected by CoverityScan, COD#1357188 ("Logically dead code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
next prev parent reply other threads:[~2017-10-09 17:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 16:12 [PATCH] IB/core: remove redundant check on prot_sg_cnt Colin King
2017-10-09 16:12 ` Colin King
2017-10-09 17:12 ` Doug Ledford [this message]
2017-10-09 17:12 ` Doug Ledford
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=1507569151.46071.48.camel@redhat.com \
--to=dledford@redhat.com \
--cc=bfields@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=colin.king@canonical.com \
--cc=hal.rosenstock@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.