From patchwork Wed Jul 18 16:25:16 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: 10532919 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 3B3E260547 for ; Wed, 18 Jul 2018 16:25:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DB132999F for ; Wed, 18 Jul 2018 16:25:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21AC2299C0; Wed, 18 Jul 2018 16:25:45 +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 C4B562999F for ; Wed, 18 Jul 2018 16:25:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731458AbeGRREW (ORCPT ); Wed, 18 Jul 2018 13:04:22 -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 S1731304AbeGRREO (ORCPT ); Wed, 18 Jul 2018 13:04:14 -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=1531931135; x=1563467135; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=MuJyKOA93id+g+STMlokuK+QHjThw2fwxqje2YZIUjE=; b=LtWxM/L1LL89Anz7LYVGKFJ3AZscsIrmmUU9489ka8ZsjVqv4kbv39jr o5F5Bfb6hvy6xQcGQ65PK7uEvVb3NSgbJS5x6xv3mOTMhPzxCFgdkyKfV vnqEycj0a2cLMay3B8rjBUr31OIDgZuz21fs4XAatugvaXARECvoxlPWR gdf2rULWFEnzFQTihjoEJnjR+nbgN46JXEtdFLC9vNN2KdV30OwTB2NGf GxuAGgR89kMYPRPB4cmMR3Vs0qSrJotsZn5vrXs64GdpV9icZ5zQpPDPS qwg1YzvgWUQihsaF8Iqrn6nMIEwEQJZoGNeI5pFgYM5Fl429/IXwsasRG Q==; X-IronPort-AV: E=Sophos;i="5.51,371,1526313600"; d="scan'208";a="85087556" 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:34 +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:05 -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:33 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche Subject: [PATCH v5 04/20] IB/core: Allow ULPs to specify NULL as the third ib_post_(send|recv|srq_recv)() argument Date: Wed, 18 Jul 2018 09:25:16 -0700 Message-Id: <20180718162532.14633-5-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 This patch does not change the behavior of the modified functions. Signed-off-by: Bart Van Assche --- include/rdma/ib_verbs.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 46d28c4df98c..4fa47f8dc6b1 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -3281,7 +3281,9 @@ static inline int ib_post_srq_recv(struct ib_srq *srq, struct ib_recv_wr *recv_wr, struct ib_recv_wr **bad_recv_wr) { - return srq->device->post_srq_recv(srq, recv_wr, bad_recv_wr); + struct ib_recv_wr *dummy; + + return srq->device->post_srq_recv(srq, recv_wr, bad_recv_wr ? : &dummy); } /** @@ -3382,7 +3384,9 @@ static inline int ib_post_send(struct ib_qp *qp, struct ib_send_wr *send_wr, struct ib_send_wr **bad_send_wr) { - return qp->device->post_send(qp, send_wr, bad_send_wr); + struct ib_send_wr *dummy; + + return qp->device->post_send(qp, send_wr, bad_send_wr ? : &dummy); } /** @@ -3397,7 +3401,9 @@ static inline int ib_post_recv(struct ib_qp *qp, struct ib_recv_wr *recv_wr, struct ib_recv_wr **bad_recv_wr) { - return qp->device->post_recv(qp, recv_wr, bad_recv_wr); + struct ib_recv_wr *dummy; + + return qp->device->post_recv(qp, recv_wr, bad_recv_wr ? : &dummy); } struct ib_cq *__ib_alloc_cq(struct ib_device *dev, void *private,