From patchwork Wed Jul 18 16:25:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10532903 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 52188600F4 for ; Wed, 18 Jul 2018 16:25:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 432B22999D for ; Wed, 18 Jul 2018 16:25:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 378F5299A3; Wed, 18 Jul 2018 16:25:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B95452999F for ; Wed, 18 Jul 2018 16:25:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731368AbeGRRES (ORCPT ); Wed, 18 Jul 2018 13:04:18 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:33647 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731323AbeGRREQ (ORCPT ); Wed, 18 Jul 2018 13:04:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1531931136; x=1563467136; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=qiRc7uNrRpHS3PqtBYHxf7cbwFv/PSVKVmMiJ2BHE/I=; b=e3ZhT23fzm7r4aoJBP/QQA1B75YmRhx2WmojShgkhMJ7VyyEgViFEp+L QpIgTbEwH8F16/C0S+S/pHw4UNe2LWhiq2XXIaEwWdPJK8u/uDLAL5kAg WkZZat9u4K8nbGeAIVQ8I9Dlo5LO4Brjc4sjMrJXl7OqMKzAZWBl2FMuN MWN/lz65l0XoJd2G7bo7PQywcCmhpenQvAQnytc+fGa7YTXLi0hLehcCb o+9wgVtjkY8R1CbYO+0UjY3xca9PwKGBtlXrx7u1R7LyEWRqkImkQuhFZ M+pmTbSCGr6C36C3nKK3EyCiyflptc8bNUu8MM2DYHTR37+GDsBivfbzs g==; X-IronPort-AV: E=Sophos;i="5.51,371,1526313600"; d="scan'208";a="85087579" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 19 Jul 2018 00:25:35 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 18 Jul 2018 09:14:06 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip02.wdc.com with ESMTP; 18 Jul 2018 09:25:35 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov Subject: [PATCH v5 14/20] net/9p: Simplify ib_post_(send|recv|srq_recv)() calls Date: Wed, 18 Jul 2018 09:25:26 -0700 Message-Id: <20180718162532.14633-15-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180718162532.14633-1-bart.vanassche@wdc.com> References: <20180718162532.14633-1-bart.vanassche@wdc.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of declaring and passing a dummy 'bad_wr' pointer, pass NULL as third argument to ib_post_(send|recv|srq_recv)(). Signed-off-by: Bart Van Assche Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov --- net/9p/trans_rdma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c index 3d414acb7015..b06286f253cb 100644 --- a/net/9p/trans_rdma.c +++ b/net/9p/trans_rdma.c @@ -396,7 +396,7 @@ static int post_recv(struct p9_client *client, struct p9_rdma_context *c) { struct p9_trans_rdma *rdma = client->trans; - struct ib_recv_wr wr, *bad_wr; + struct ib_recv_wr wr; struct ib_sge sge; c->busa = ib_dma_map_single(rdma->cm_id->device, @@ -415,7 +415,7 @@ post_recv(struct p9_client *client, struct p9_rdma_context *c) wr.wr_cqe = &c->cqe; wr.sg_list = &sge; wr.num_sge = 1; - return ib_post_recv(rdma->qp, &wr, &bad_wr); + return ib_post_recv(rdma->qp, &wr, NULL); error: p9_debug(P9_DEBUG_ERROR, "EIO\n"); @@ -425,7 +425,7 @@ post_recv(struct p9_client *client, struct p9_rdma_context *c) static int rdma_request(struct p9_client *client, struct p9_req_t *req) { struct p9_trans_rdma *rdma = client->trans; - struct ib_send_wr wr, *bad_wr; + struct ib_send_wr wr; struct ib_sge sge; int err = 0; unsigned long flags; @@ -520,7 +520,7 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req) * status in case of a very fast reply. */ req->status = REQ_STATUS_SENT; - err = ib_post_send(rdma->qp, &wr, &bad_wr); + err = ib_post_send(rdma->qp, &wr, NULL); if (err) goto send_error;