From: Colin King <colin.king@canonical.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>,
Anna Schumaker <anna.schumaker@netapp.com>,
"J . Bruce Fields" <bfields@fieldses.org>,
Jeff Layton <jlayton@poochiereds.net>,
"David S . Miller" <davem@davemloft.net>,
Chuck Lever <chuck.lever@oracle.com>,
Sagi Grimberg <sagig@mellanox.com>,
Steve Wise <swise@opengridcomputing.com>,
Doug Ledford <dledford@redhat.com>,
linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero
Date: Tue, 24 Nov 2015 23:11:41 +0000 [thread overview]
Message-ID: <1448406701-12474-1-git-send-email-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
Add the missing curly braces so that rc is only set to zero when
it is non-zero. Without this minor fix, rc is set to zero even
when it is zero, which is slightly redundant.
Detected with smatch static analysis.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/sunrpc/xprtrdma/verbs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index eadd1655..2cc1014 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -852,10 +852,11 @@ retry:
if (extras) {
rc = rpcrdma_ep_post_extra_recv(r_xprt, extras);
- if (rc)
+ if (rc) {
pr_warn("%s: rpcrdma_ep_post_extra_recv: %i\n",
__func__, rc);
rc = 0;
+ }
}
}
--
2.6.2
next reply other threads:[~2015-11-24 23:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 23:11 Colin King [this message]
2015-12-02 15:28 ` [PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero Anna Schumaker
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=1448406701-12474-1-git-send-email-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=anna.schumaker@netapp.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=jlayton@poochiereds.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sagig@mellanox.com \
--cc=swise@opengridcomputing.com \
--cc=trond.myklebust@primarydata.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