From patchwork Tue Jul 10 18:27:39 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: 10517943 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 1BC84600CA for ; Tue, 10 Jul 2018 18:54:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1318228FF5 for ; Tue, 10 Jul 2018 18:54:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0723929011; Tue, 10 Jul 2018 18:54:01 +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 872FD28FF5 for ; Tue, 10 Jul 2018 18:54:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733186AbeGJS1y (ORCPT ); Tue, 10 Jul 2018 14:27:54 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:48096 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733173AbeGJS1x (ORCPT ); Tue, 10 Jul 2018 14:27:53 -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=1531247264; x=1562783264; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Ss3vcFBjKh4ry4abMT4Hr8E65XrEEi0D/HMFG7o2lXQ=; b=KhXgLZ4it0wLFIhzXKS7wVgjjXYM/yat4/jCaq9o6jkIJRX/uVYXLNv9 UBxlh8jfgA8xQuoE8JOKK4Ijn7B4jRE7PCi28XMOFn7aRIOzlO80YDS8n UmqehgCr2yxKwgLuFwcMU0hM3VMZPEv86I62h7B24yljoMzNBdEQ9/m8/ 2hPMyYwMqeYAkAzlZTYG5e7RUrjB05OGhAp12FGyx45CyXojdhivGmogZ ZInqNrEboEB69Chx68VnfsdF8EzfpuQ7lDtIC52pQfi4JrckVwe362QwL 3yTzSuVNlYif2W7QyYXRtbOT2hiTPryX4qjv4W1U7is6/h4OYvDlw0v5h g==; X-IronPort-AV: E=Sophos;i="5.51,335,1526313600"; d="scan'208";a="86677880" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Jul 2018 02:27:43 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 10 Jul 2018 11:16:32 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip02.wdc.com with ESMTP; 10 Jul 2018 11:27:42 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Max Gurtovoy Subject: [PATCH v3 1/4] IB/iser: Inline two work request conversion functions Date: Tue, 10 Jul 2018 11:27:39 -0700 Message-Id: <20180710182742.24702-2-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180710182742.24702-1-bart.vanassche@wdc.com> References: <20180710182742.24702-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 Reviewed-by: Sagi Grimberg --- 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;