Netdev List
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	netdev@vger.kernel.org,
	Anna Schumaker <anna.schumaker@netapp.com>,
	"David S. Miller" <davem@davemloft.net>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Jeff Layton <jlayton@poochiereds.net>,
	Trond Myklebust <trond.myklebust@primarydata.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup()
Date: Mon, 22 May 2017 16:31:08 -0400	[thread overview]
Message-ID: <DC0EF67A-4AF8-415A-8EC0-F86F8E6F08FE@oracle.com> (raw)
In-Reply-To: <3c3f0067-1438-129c-d921-e2c056d5776b@users.sourceforge.net>


> On May 22, 2017, at 4:24 PM, SF Markus Elfring <elfring@users.sourceforge.net> wrote:
> 
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 22 May 2017 22:18:28 +0200
> 
> Omit an extra message for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Reviewed-by: Chuck Lever <chuck.lever@oracle.com>


> ---
> net/sunrpc/xprtrdma/backchannel.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
> index 24fedd4b117e..03f6b5840764 100644
> --- a/net/sunrpc/xprtrdma/backchannel.c
> +++ b/net/sunrpc/xprtrdma/backchannel.c
> @@ -119,11 +119,9 @@ int xprt_rdma_bc_setup(struct rpc_xprt *xprt, unsigned int reqs)
> 
> 	for (i = 0; i < (reqs << 1); i++) {
> 		rqst = kzalloc(sizeof(*rqst), GFP_KERNEL);
> -		if (!rqst) {
> -			pr_err("RPC:       %s: Failed to create bc rpc_rqst\n",
> -			       __func__);
> +		if (!rqst)
> 			goto out_free;
> -		}
> +
> 		dprintk("RPC:       %s: new rqst %p\n", __func__, rqst);
> 
> 		rqst->rq_xprt = &r_xprt->rx_xprt;
> -- 
> 2.13.0

--
Chuck Lever

      reply	other threads:[~2017-05-22 20:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 20:24 [PATCH] xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup() SF Markus Elfring
2017-05-22 20:31 ` Chuck Lever [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=DC0EF67A-4AF8-415A-8EC0-F86F8E6F08FE@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=anna.schumaker@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=davem@davemloft.net \
    --cc=elfring@users.sourceforge.net \
    --cc=jlayton@poochiereds.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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