From patchwork Thu May 22 00:55:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 4219441 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A3EC6BEEAB for ; Thu, 22 May 2014 00:55:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D79092026C for ; Thu, 22 May 2014 00:55:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBAFD2037A for ; Thu, 22 May 2014 00:55:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752496AbaEVAzf (ORCPT ); Wed, 21 May 2014 20:55:35 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:47182 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752493AbaEVAzd (ORCPT ); Wed, 21 May 2014 20:55:33 -0400 Received: by mail-ig0-f179.google.com with SMTP id hn18so2879740igb.6 for ; Wed, 21 May 2014 17:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:subject:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=JpQmkZrfzA5NubeEpEngl9srgE+2+sNqLpOCn/6lD4w=; b=nQire3eOYfwcao56zYHEjZRdqqU2c7sdRRhEKO0yh7eHhS5cS5mkh10TAL/XhSzW5x dJ/lMn79r7a/pNJFaYRwVQh26eywTDeWVyKxmbGhpu6stC5Vh8XivMJuhXJVZLnxgS3M wL8YwFnBKMfi/ejLNJvadmlHy76LyHtbNF61hRDDtQVwvYJacpHdz2i2juQczc8UFlSx 0e/lCNbhlm1p69F7+V2bbMY7hjZLdVMJmqgDbKYR3OfMB8FESvZPcpuh4mPJTy148+xg QNbuNbkG1Lbi0CbFhLZZgnpZsnnpRCpdNEKK07yo5q/sPinATBaGNYyD8TIhKsYcuqGF 1Rww== X-Received: by 10.50.43.134 with SMTP id w6mr18058110igl.3.1400720132984; Wed, 21 May 2014 17:55:32 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:82ee:73ff:fe43:d64f]) by mx.google.com with ESMTPSA id u10sm9221452igz.21.2014.05.21.17.55.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 May 2014 17:55:32 -0700 (PDT) From: Chuck Lever Subject: [PATCH v4 09/24] xprtrdma: Simplify rpcrdma_deregister_external() synopsis To: linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org Date: Wed, 21 May 2014 20:55:31 -0400 Message-ID: <20140522005531.27190.87678.stgit@manet.1015granger.net> In-Reply-To: <20140522004505.27190.58897.stgit@manet.1015granger.net> References: <20140522004505.27190.58897.stgit@manet.1015granger.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clean up: All remaining callers of rpcrdma_deregister_external() pass NULL as the last argument, so remove that argument. Signed-off-by: Chuck Lever Tested-by: Steve Wise --- net/sunrpc/xprtrdma/rpc_rdma.c | 2 +- net/sunrpc/xprtrdma/transport.c | 2 +- net/sunrpc/xprtrdma/verbs.c | 8 +------- net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index aae1726..436d229 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c @@ -270,7 +270,7 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target, out: for (pos = 0; nchunks--;) pos += rpcrdma_deregister_external( - &req->rl_segments[pos], r_xprt, NULL); + &req->rl_segments[pos], r_xprt); return 0; } diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index c23b0c1..430cabb 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c @@ -575,7 +575,7 @@ xprt_rdma_free(void *buffer) for (i = 0; req->rl_nchunks;) { --req->rl_nchunks; i += rpcrdma_deregister_external( - &req->rl_segments[i], r_xprt, NULL); + &req->rl_segments[i], r_xprt); } if (req->rl_iov.length == 0) { /* see allocate above */ diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 7c7e9b4..0cbc83c 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -1632,7 +1632,7 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg, int rpcrdma_deregister_external(struct rpcrdma_mr_seg *seg, - struct rpcrdma_xprt *r_xprt, void *r) + struct rpcrdma_xprt *r_xprt) { struct rpcrdma_ia *ia = &r_xprt->rx_ia; int nsegs = seg->mr_nsegs, rc; @@ -1658,12 +1658,6 @@ rpcrdma_deregister_external(struct rpcrdma_mr_seg *seg, default: break; } - if (r) { - struct rpcrdma_rep *rep = r; - void (*func)(struct rpcrdma_rep *) = rep->rr_func; - rep->rr_func = NULL; - func(rep); /* dereg done, callback now */ - } return nsegs; } diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h index bf08ee0..3f44d6a 100644 --- a/net/sunrpc/xprtrdma/xprt_rdma.h +++ b/net/sunrpc/xprtrdma/xprt_rdma.h @@ -331,7 +331,7 @@ int rpcrdma_deregister_internal(struct rpcrdma_ia *, int rpcrdma_register_external(struct rpcrdma_mr_seg *, int, int, struct rpcrdma_xprt *); int rpcrdma_deregister_external(struct rpcrdma_mr_seg *, - struct rpcrdma_xprt *, void *); + struct rpcrdma_xprt *); /* * RPC/RDMA connection management calls - xprtrdma/rpc_rdma.c