All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: James Lentini <jlentini@netapp.com>
Cc: nfs@lists.sourceforge.net
Subject: Re: [PATCH 03/27] SUNRPC: Check a return result
Date: Tue, 30 Oct 2007 12:56:58 -0400	[thread overview]
Message-ID: <1193763418.7422.76.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0710301232070.32008@jlentini-linux.nane.netapp.com>


On Tue, 2007-10-30 at 12:42 -0400, James Lentini wrote:
> On Fri, 26 Oct 2007, Chuck Lever wrote:
> 
> > Minor: Replace an empty if statement with a debugging dprintk.
> > 
> > Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> > Cc: Thomas Talpey <Thomas.Talpey@netapp.com>
> > ---
> > 
> >  net/sunrpc/xprtrdma/verbs.c |    8 +++++---
> >  1 files changed, 5 insertions(+), 3 deletions(-)
> > 
> > diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
> > index 44b0fb9..ffbf22a 100644
> > --- a/net/sunrpc/xprtrdma/verbs.c
> > +++ b/net/sunrpc/xprtrdma/verbs.c
> > @@ -522,7 +522,7 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
> >  				struct rpcrdma_create_data_internal *cdata)
> >  {
> >  	struct ib_device_attr devattr;
> > -	int rc;
> > +	int rc, err;
> >  
> >  	rc = ib_query_device(ia->ri_id->device, &devattr);
> >  	if (rc) {
> > @@ -648,8 +648,10 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
> >  	return 0;
> >  
> >  out2:
> > -	if (ib_destroy_cq(ep->rep_cq))
> > -		;
> > +	err = ib_destroy_cq(ep->rep_cq);
> > +	if (err)
> > +		dprintk("RPC:       %s: ib_destroy_cq returned %i\n",
> > +			__func__, err);
> >  out1:
> >  	return rc;
> >  }
> 
> Good eyes, Chuck. One minor suggestion: instead of adding "err", how 
> about reusing "rc"? Here's a patch against Trond's nfs-2.6 tree.
> 
> Signed-off-by: James Lentini <jlentini@netapp.com>
> 
>  verbs.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> --- a/net/sunrpc/xprtrdma/verbs.c
> +++ b/net/sunrpc/xprtrdma/verbs.c
> @@ -648,8 +648,10 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep,
>  	return 0;
>  
>  out2:
> -	if (ib_destroy_cq(ep->rep_cq))
> -		;
> +	rc = ib_destroy_cq(ep->rep_cq);
> +	if (rc)
> +		dprintk("RPC:       %s: ib_destroy_cq returned %i\n",
> +			__func__, rc);
>  out1:
>  	return rc;
>  }

NAK. That would clobber the error that you are trying to return from
ib_req_notify_cq.

Cheers
  Trond


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

      parent reply	other threads:[~2007-10-30 16:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26 17:30 [PATCH 03/27] SUNRPC: Check a return result Chuck Lever
2007-10-30 16:42 ` James Lentini
2007-10-30 16:49   ` Chuck Lever
2007-10-30 16:59     ` Talpey, Thomas
2007-10-30 17:09       ` James Lentini
2007-10-30 16:56   ` Trond Myklebust [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=1193763418.7422.76.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=jlentini@netapp.com \
    --cc=nfs@lists.sourceforge.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 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.