From patchwork Thu Mar 21 17:24:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10864147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 18D27139A for ; Thu, 21 Mar 2019 17:24:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E71AA2A247 for ; Thu, 21 Mar 2019 17:24:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBD782A22F; Thu, 21 Mar 2019 17:24:33 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 781E92A247 for ; Thu, 21 Mar 2019 17:24:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728602AbfCURYc (ORCPT ); Thu, 21 Mar 2019 13:24:32 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42652 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727921AbfCURYc (ORCPT ); Thu, 21 Mar 2019 13:24:32 -0400 Received: by mail-pg1-f196.google.com with SMTP id p6so4642953pgh.9 for ; Thu, 21 Mar 2019 10:24:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JhLsf1qZnMcnMWuHw9A1+WGbNelzwQjfpik3tJwwQfI=; b=bkDEnS1x7paOmdeKVwJtRAvlc4jl+/YpP+z/KfRNKNfVfVMDTOgV/bLJ7/o31NO18L Kyuk0jVX7OI7m388Wlf/KVJix078hJ6VHdvfTwrIiXlO4nC9sCi2lFXidZI/8fo6plKZ uNXjv2uT8uz4HSJd3Wh36xJh3RbGpX0FPO76AFhuoZvcY1s0xhCBuXwGwuDBzefm5vL7 PzrrSDGbRkp+or6un+ZY8gjvIpVHhnf2s54bmDsGteIHWvcvvQUMKwUFsS6HSCRmZNrt 1p5dxB3z7qPR79AmAJH9ywj6C409KsNNGUtLkY+1AbB1NyvxEwWOLIt1pR2iKI8BknTz GjSA== X-Gm-Message-State: APjAAAWpFQFK1B8qCjAToCMfVEKpQbAGAPMFvUNyzHdbV9AnZYfm2daV +JL5N1Bv1NiWhdiBs6evbbg= X-Google-Smtp-Source: APXvYqzNI1Ovz6SCY0MHXTBIZ03eYoXE6eLdovLQ2uWcQkq/x0OIMPUPiCHG4h0xUXzgyHWxZrji1g== X-Received: by 2002:a17:902:9b98:: with SMTP id y24mr4685157plp.167.1553189071077; Thu, 21 Mar 2019 10:24:31 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id s184sm7528549pfb.1.2019.03.21.10.24.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 10:24:30 -0700 (PDT) From: Bart Van Assche To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Mike Marciniszyn , Dennis Dalessandro Subject: [PATCH 6/8] IB/hfi1: Remove set-but-not-used variables Date: Thu, 21 Mar 2019 10:24:15 -0700 Message-Id: <20190321172417.77869-7-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190321172417.77869-1-bvanassche@acm.org> References: <20190321172417.77869-1-bvanassche@acm.org> MIME-Version: 1.0 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 avoids that compiler warnings are reported when building with W=1. Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky --- drivers/infiniband/hw/hfi1/tid_rdma.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/tid_rdma.c b/drivers/infiniband/hw/hfi1/tid_rdma.c index fdda33aca77f..93f1762a20cd 100644 --- a/drivers/infiniband/hw/hfi1/tid_rdma.c +++ b/drivers/infiniband/hw/hfi1/tid_rdma.c @@ -2019,7 +2019,6 @@ static int tid_rdma_rcv_error(struct hfi1_packet *packet, trace_hfi1_tid_req_rcv_err(qp, 0, e->opcode, e->psn, e->lpsn, req); if (e->opcode == TID_OP(READ_REQ)) { struct ib_reth *reth; - u32 offset; u32 len; u32 rkey; u64 vaddr; @@ -2031,7 +2030,6 @@ static int tid_rdma_rcv_error(struct hfi1_packet *packet, * The requester always restarts from the start of the original * request. */ - offset = delta_psn(psn, e->psn) * qp->pmtu; len = be32_to_cpu(reth->length); if (psn != e->psn || len != req->total_len) goto unlock; @@ -2465,11 +2463,10 @@ void hfi1_rc_rcv_tid_rdma_read_resp(struct hfi1_packet *packet) u32 opcode, aeth; bool is_fecn; unsigned long flags; - u32 kpsn, ipsn; + u32 ipsn; trace_hfi1_sender_rcv_tid_read_resp(qp); is_fecn = process_ecn(qp, packet); - kpsn = mask_psn(be32_to_cpu(ohdr->bth[2])); aeth = be32_to_cpu(ohdr->u.tid_rdma.r_rsp.aeth); opcode = (be32_to_cpu(ohdr->bth[0]) >> 24) & 0xff; @@ -4486,13 +4483,12 @@ void hfi1_rc_rcv_tid_rdma_ack(struct hfi1_packet *packet) struct rvt_swqe *wqe; struct tid_rdma_request *req; struct tid_rdma_flow *flow; - u32 aeth, psn, req_psn, ack_psn, fspsn, resync_psn, ack_kpsn; - bool is_fecn; + u32 aeth, psn, req_psn, ack_psn, resync_psn, ack_kpsn; unsigned long flags; u16 fidx; trace_hfi1_tid_write_sender_rcv_tid_ack(qp, 0); - is_fecn = process_ecn(qp, packet); + process_ecn(qp, packet); psn = mask_psn(be32_to_cpu(ohdr->bth[2])); aeth = be32_to_cpu(ohdr->u.tid_rdma.ack.aeth); req_psn = mask_psn(be32_to_cpu(ohdr->u.tid_rdma.ack.verbs_psn)); @@ -4691,7 +4687,7 @@ void hfi1_rc_rcv_tid_rdma_ack(struct hfi1_packet *packet) IB_AETH_CREDIT_MASK) { case 0: /* PSN sequence error */ flow = &req->flows[req->acked_tail]; - fspsn = full_flow_psn(flow, flow->flow_state.spsn); + full_flow_psn(flow, flow->flow_state.spsn); trace_hfi1_tid_flow_rcv_tid_ack(qp, req->acked_tail, flow); req->r_ack_psn = mask_psn(be32_to_cpu(ohdr->bth[2])); @@ -4846,10 +4842,9 @@ void hfi1_rc_rcv_tid_rdma_resync(struct hfi1_packet *packet) struct tid_rdma_flow *flow; struct tid_flow_state *fs = &qpriv->flow_state; u32 psn, generation, idx, gen_next; - bool is_fecn; unsigned long flags; - is_fecn = process_ecn(qp, packet); + process_ecn(qp, packet); psn = mask_psn(be32_to_cpu(ohdr->bth[2])); generation = mask_psn(psn + 1) >> HFI1_KDETH_BTH_SEQ_SHIFT;