linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anna Schumaker <Anna.Schumaker@Netapp.com>
To: zhong jiang <zhongjiang@huawei.com>, <davem@davemloft.net>,
	"J. Bruce Fields" <bfields@fieldses.org>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] net:svc_rdma_transport: remove unneeded variable 'ret' in rdma_listen_handler
Date: Tue, 7 Aug 2018 10:49:11 -0400	[thread overview]
Message-ID: <2c343d78-e668-1b97-a4e6-228296da0d70@Netapp.com> (raw)
In-Reply-To: <1533640809-1221-2-git-send-email-zhongjiang@huawei.com>

(Adding Bruce since he takes nfs / sunrpc server patches)

On 08/07/2018 07:20 AM, zhong jiang wrote:
> The ret is not modified after initalization, So just remove the variable
> and return 0.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  net/sunrpc/xprtrdma/svc_rdma_transport.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> index 547b2cd..2848caf 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
> @@ -296,7 +296,6 @@ static int rdma_listen_handler(struct rdma_cm_id *cma_id,
>  			       struct rdma_cm_event *event)
>  {
>  	struct sockaddr *sap = (struct sockaddr *)&cma_id->route.addr.src_addr;
> -	int ret = 0;
>  
>  	trace_svcrdma_cm_event(event, sap);
>  
> @@ -315,7 +314,7 @@ static int rdma_listen_handler(struct rdma_cm_id *cma_id,
>  		break;
>  	}
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static int rdma_cma_handler(struct rdma_cm_id *cma_id,
> 

  reply	other threads:[~2018-08-07 14:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 11:20 [PATCH 0/3] net: remove unneeded variable for return value zhong jiang
2018-08-07 11:20 ` [PATCH 1/3] net:svc_rdma_transport: remove unneeded variable 'ret' in rdma_listen_handler zhong jiang
2018-08-07 14:49   ` Anna Schumaker [this message]
2018-08-09 20:06     ` J. Bruce Fields
2018-08-07 11:20 ` [PATCH 2/3] net:af_iucv: get rid of the unneeded variable 'err' in afiucv_pm_freeze zhong jiang
2018-08-08 16:41   ` David Miller
2018-08-07 11:20 ` [PATCH 3/3] net:mod: remove unneeded variable 'ret' in init_p9 zhong jiang
2018-08-08 16:41   ` David Miller

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=2c343d78-e668-1b97-a4e6-228296da0d70@Netapp.com \
    --to=anna.schumaker@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zhongjiang@huawei.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;
as well as URLs for NNTP newsgroup(s).