From patchwork Fri Jul 6 23:08:08 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: 10512605 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 0F6186024A for ; Fri, 6 Jul 2018 23:08:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2BC82873A for ; Fri, 6 Jul 2018 23:08:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6DFE287B7; Fri, 6 Jul 2018 23:08:15 +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 7DEDB2870D for ; Fri, 6 Jul 2018 23:08:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932774AbeGFXIO (ORCPT ); Fri, 6 Jul 2018 19:08:14 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:51137 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932713AbeGFXIN (ORCPT ); Fri, 6 Jul 2018 19:08:13 -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=1530918493; x=1562454493; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Ss3vcFBjKh4ry4abMT4Hr8E65XrEEi0D/HMFG7o2lXQ=; b=mQLLaroeA/29U2gYlbDHja9mQEtZ4yOdmWwk+xN9e4+ItDZOwT44vkxg iR8/3pdulz9TNxT4aGms9PhTtJouuzwxKJeoXuAH8+KBodK44UhXlnb1q GLBfYBGg1k6AIa7AriCeJ4+zrdBFMRCnyWcY7cq6peWEusuea+axgn3TB 8/FP0oaktNHDEXmEH4lnRT07ZBZlSzZK+ksQfuFkNa/N6a8plCPhoBTlS r32uCINRhzrwZqg+3hcDI4io7ZZmtFESBZSXf/lloGXvvT4s1fI9Qhetx pouwmXPgy6ZmqD53DW0E6yPYJGBlni7UatiIJ+EXm3jqMz87IOGdHJHtW Q==; X-IronPort-AV: E=Sophos;i="5.51,318,1526313600"; d="scan'208";a="84695793" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 07 Jul 2018 07:08:12 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 06 Jul 2018 15:57:24 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip01.wdc.com with ESMTP; 06 Jul 2018 16:08:12 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Max Gurtovoy Subject: [PATCH v2 1/4] IB/iser: Inline two work request conversion functions Date: Fri, 6 Jul 2018 16:08:08 -0700 Message-Id: <20180706230811.25720-2-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180706230811.25720-1-bart.vanassche@wdc.com> References: <20180706230811.25720-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 Since the next patch will change the return type of these functions into a const pointer and since the iSER driver modifies the work request these functions return a pointer two, inline two work request conversion function calls. This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Max Gurtovoy --- drivers/infiniband/ulp/iser/iser_memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index ca844a926e6a..a77d020cc89d 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c @@ -405,7 +405,8 @@ iser_reg_sig_mr(struct iscsi_iser_task *iser_task, ib_update_fast_reg_key(mr, ib_inc_rkey(mr->rkey)); - wr = sig_handover_wr(iser_tx_next_wr(tx_desc)); + wr = container_of(iser_tx_next_wr(tx_desc), struct ib_sig_handover_wr, + wr); wr->wr.opcode = IB_WR_REG_SIG_MR; wr->wr.wr_cqe = cqe; wr->wr.sg_list = &data_reg->sge; @@ -457,7 +458,7 @@ static int iser_fast_reg_mr(struct iscsi_iser_task *iser_task, return n < 0 ? n : -EINVAL; } - wr = reg_wr(iser_tx_next_wr(tx_desc)); + wr = container_of(iser_tx_next_wr(tx_desc), struct ib_reg_wr, wr); wr->wr.opcode = IB_WR_REG_MR; wr->wr.wr_cqe = cqe; wr->wr.send_flags = 0;