From patchwork Mon Jul 16 23:59:01 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: 10527779 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 C154D60545 for ; Tue, 17 Jul 2018 00:00:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADC3828D36 for ; Tue, 17 Jul 2018 00:00:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1D3E28D3A; Tue, 17 Jul 2018 00:00:22 +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 372CE28CC5 for ; Tue, 17 Jul 2018 00:00:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730092AbeGQA3y (ORCPT ); Mon, 16 Jul 2018 20:29:54 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:2175 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730736AbeGQA3y (ORCPT ); Mon, 16 Jul 2018 20:29:54 -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=1531785610; x=1563321610; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=qiRc7uNrRpHS3PqtBYHxf7cbwFv/PSVKVmMiJ2BHE/I=; b=q9yoVgxu6LPfa+SvBE9DnGPUM2fJfvKixabPFfPLA6X3/ypMIKJPE0fR Yw9E9qLVCPW7RVpqbtl0U8QmnuUlzGMDdyht+fN0FUfTsRriWNeJFj5QX GT3G44eTnhdzkN69vbb/3h2bAZJr4s5eutJ8B1sxgHviKrK90onIrnTqH c+TehUYIVsIWOux73D2hYYwmeZudk/PswdXQj2FEfNxoj9VFnaipZYkFS 6yOGMC37GFu4Xpg4nr+amUjkuRMw7O+ki0xLk91dcNQC43CMPCEnB3Czp IJGmFU/vtLkhpYxOlBaoGa406bS9CsX83KZATE72Zp38hnnamw3BPGPEm Q==; X-IronPort-AV: E=Sophos;i="5.51,363,1526313600"; d="scan'208";a="84132668" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 17 Jul 2018 07:59:09 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 16 Jul 2018 16:48:00 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 16 Jul 2018 16:59:08 -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 v4 13/17] net/9p: Simplify ib_post_(send|recv|srq_recv)() calls Date: Mon, 16 Jul 2018 16:59:01 -0700 Message-Id: <20180716235905.6387-14-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180716235905.6387-1-bart.vanassche@wdc.com> References: <20180716235905.6387-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;