All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anna Schumaker <Anna.Schumaker@netapp.com>
To: Colin King <colin.king@canonical.com>,
	Trond Myklebust <trond.myklebust@primarydata.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: Re: [PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero
Date: Wed, 2 Dec 2015 10:28:47 -0500	[thread overview]
Message-ID: <565F0E2F.7070301@Netapp.com> (raw)
In-Reply-To: <1448406701-12474-1-git-send-email-colin.king@canonical.com>

On 11/24/2015 06:11 PM, Colin King wrote:
> 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.

Thanks for the patch, but I've already have a patch from Dan Carpenter queued up to fix this.

Anna

> 
> 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;
> +			}
>  		}
>  	}
>  
> 


      reply	other threads:[~2015-12-02 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 23:11 [PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero Colin King
2015-11-24 23:11 ` Colin King
2015-12-02 15:28 ` Anna Schumaker [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=565F0E2F.7070301@Netapp.com \
    --to=anna.schumaker@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=colin.king@canonical.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 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.