From patchwork Mon Jul 16 23:58:52 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: 10527773 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 0EA4B60545 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 EF9E028D1E for ; Tue, 17 Jul 2018 00:00:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E43F728D36; Tue, 17 Jul 2018 00:00:21 +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 8414128D1E for ; Tue, 17 Jul 2018 00:00:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730245AbeGQA3w (ORCPT ); Mon, 16 Jul 2018 20:29:52 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:64408 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730063AbeGQA3w (ORCPT ); Mon, 16 Jul 2018 20:29:52 -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=1531785608; x=1563321608; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=MuJyKOA93id+g+STMlokuK+QHjThw2fwxqje2YZIUjE=; b=r8KaTsRNbdHFAM9DaCUzXCa5hMbuViuw3ga6hQM4F+dv7fdSdq8Xoum7 MyralbbYDgrIfC5TFBcfqOOnCAKkIL6OkqP4GG0hFdoSnf5iHe1j63DRm ymR2CmTIQkfIxq//86Pwh9StTr33Xc45ZW6wfxjJMTGzgQNGG5qyfN0zw 5J/E2rjPkAaissdwu2lBQHaQAwvjthotOMe+xy3TSFOG5XdqYcUK0XVc4 GesdE2/trB/F3BGzo49muLjy7VYDF5k9MlUUG1XTaYTlUwP2wUtRAlDpq D5LI1YohyMMRl017qoz5ACJxWpInbgctMtkrISYcUd8xfDFjxe5R8WP2W w==; X-IronPort-AV: E=Sophos;i="5.51,363,1526313600"; d="scan'208";a="84132656" 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:07 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 16 Jul 2018 16:47:59 -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:06 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche Subject: [PATCH v4 04/17] IB/core: Allow ULPs to specify NULL as the third ib_post_(send|recv|srq_recv)() argument Date: Mon, 16 Jul 2018 16:58:52 -0700 Message-Id: <20180716235905.6387-5-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 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,