From patchwork Fri Jul 6 17:17:28 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: 10512175 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 2D98260325 for ; Fri, 6 Jul 2018 17:17:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11D5228720 for ; Fri, 6 Jul 2018 17:17:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 063AF28739; Fri, 6 Jul 2018 17:17: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 A115628720 for ; Fri, 6 Jul 2018 17:17:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933532AbeGFRRm (ORCPT ); Fri, 6 Jul 2018 13:17:42 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:38236 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932834AbeGFRRj (ORCPT ); Fri, 6 Jul 2018 13:17:39 -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=1530897460; x=1562433460; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=xhfVi+N8z1fR7zTauYn1IUKgtQbXFDTsLhIWJerp99A=; b=MOcZ7IEgI8d+Lu0QkbhI9or+aeQLO0t3u24MWJUcfPUqYo7XlkgDiycf M29oYkoNjNyuipnO0Cg+9rJGAQjhLM4MsqmYgMnUVI4UjfbBwUBHPDEcl IIbqNC9cfUJCpeSc5kEIUc6gZdHw7QykYg3Fv9rbbBG2Puyo6P0z3mEQL P2x/gk7yadbYZwNWg+1bwiPnAjA5hvpAyEI5bdopRYP8AOSSjP3weOGPM Y6ZJw/Fuj0WCGviTXyERkyHgNoWhDCl3UXfl0haGmALWmO9KY4N1V75SQ kIg8An/Mnbp4uLTQ+LYNSazidRbUJCKM9DXJKeC7HLK+Zs8a8MXhmqU4M Q==; X-IronPort-AV: E=Sophos;i="5.51,317,1526313600"; d="scan'208";a="84076253" 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 01:17:39 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 06 Jul 2018 10:06:50 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip02.wdc.com with ESMTP; 06 Jul 2018 10:17:39 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Steve Wise Subject: [PATCH 05/13] RDMA/cxgb4: Declare work request pointers that are not modified const Date: Fri, 6 Jul 2018 10:17:28 -0700 Message-Id: <20180706171736.14543-6-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180706171736.14543-1-bart.vanassche@wdc.com> References: <20180706171736.14543-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 Signed-off-by: Bart Van Assche Cc: Steve Wise Acked-by: Steve Wise --- drivers/infiniband/hw/cxgb4/qp.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index c9d6aeb1201d..e75698c4c45b 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -382,7 +382,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, } static int build_immd(struct t4_sq *sq, struct fw_ri_immd *immdp, - struct ib_send_wr *wr, int max, u32 *plenp) + const struct ib_send_wr *wr, int max, u32 *plenp) { u8 *dstp, *srcp; u32 plen = 0; @@ -452,7 +452,7 @@ static int build_isgl(__be64 *queue_start, __be64 *queue_end, } static int build_rdma_send(struct t4_sq *sq, union t4_wr *wqe, - struct ib_send_wr *wr, u8 *len16) + const struct ib_send_wr *wr, u8 *len16) { u32 plen; int size; @@ -519,7 +519,7 @@ static int build_rdma_send(struct t4_sq *sq, union t4_wr *wqe, } static int build_rdma_write(struct t4_sq *sq, union t4_wr *wqe, - struct ib_send_wr *wr, u8 *len16) + const struct ib_send_wr *wr, u8 *len16) { u32 plen; int size; @@ -561,7 +561,8 @@ static int build_rdma_write(struct t4_sq *sq, union t4_wr *wqe, return 0; } -static int build_rdma_read(union t4_wr *wqe, struct ib_send_wr *wr, u8 *len16) +static int build_rdma_read(union t4_wr *wqe, const struct ib_send_wr *wr, + u8 *len16) { if (wr->num_sge > 1) return -EINVAL; @@ -701,7 +702,8 @@ static int build_memreg(struct t4_sq *sq, union t4_wr *wqe, return 0; } -static int build_inv_stag(union t4_wr *wqe, struct ib_send_wr *wr, u8 *len16) +static int build_inv_stag(union t4_wr *wqe, const struct ib_send_wr *wr, + u8 *len16) { wqe->inv.stag_inv = cpu_to_be32(wr->ex.invalidate_rkey); wqe->inv.r2 = 0;