From patchwork Wed Mar 27 23:50:49 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: 10874363 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 09EB213B5 for ; Wed, 27 Mar 2019 23:51:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB55428BFC for ; Wed, 27 Mar 2019 23:51:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF78428DA5; Wed, 27 Mar 2019 23:51:27 +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 E227328BFC for ; Wed, 27 Mar 2019 23:51:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731654AbfC0XvK (ORCPT ); Wed, 27 Mar 2019 19:51:10 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:46262 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC0XvJ (ORCPT ); Wed, 27 Mar 2019 19:51:09 -0400 Received: by mail-pf1-f194.google.com with SMTP id 9so10426813pfj.13 for ; Wed, 27 Mar 2019 16:51:09 -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=VPO9/ZYnEQbbHeDlnckQqoT1ctAWSZkdxMfThvkMs3M=; b=BK55HsdUdSl3ibE8nbLv1TYHftdX0cqYmXB812Iae6OLctXXfqJ0h9VNlUD4AvqOGj oKy2moFs91WIhYBMlabcMSDxRXRtiQpntT6hu/4P3ZfWM/makJSlpoDv0XxJ5WPeHxO8 F3BpBdtRv8dRp94rMLJkGxi+5pZXB9K4bIlUNbcUzohUc14cyVLm9uMDMkvGNZu4sMwA hCVGlIMiF6q4jwbausvzDbTDFQpP7asVqxLZGkqP2Q64ixJqRY2DGOpK1+dD9V7IhnrR NG0DwTWN20jfGP9BQw3s5XbN6PRCVRzTipK4AjyO8cll8xh24zcOF1YjCOOx1Im0ftyJ 5KdA== X-Gm-Message-State: APjAAAX1Zs4k9xIym4NFmjz1iaA+K2ZmAyQzR9iG2RIsgg5v7ItWDWWn t/kSQ/5VlzPY2H/lcSszYjE= X-Google-Smtp-Source: APXvYqwkIA2GPvJnJWuan0uKrliWhInMXDsIJ18IeKBSCNkFSiDDzZWfPeAU2K400nfEwXCTUwKdCA== X-Received: by 2002:aa7:8144:: with SMTP id d4mr36327714pfn.88.1553730669194; Wed, 27 Mar 2019 16:51:09 -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 a3sm16493115pfn.182.2019.03.27.16.51.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 16:51:08 -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 v2 5/7] IB/hfi1: Remove set-but-not-used variables Date: Wed, 27 Mar 2019 16:50:49 -0700 Message-Id: <20190327235051.67361-6-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190327235051.67361-1-bvanassche@acm.org> References: <20190327235051.67361-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. Reviewed-by: Leon Romanovsky Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Bart Van Assche --- 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;