From patchwork Tue Jul 10 18:30:31 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: 10517629 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 053936032A for ; Tue, 10 Jul 2018 18:30:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE3C62930B for ; Tue, 10 Jul 2018 18:30:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2D7129332; Tue, 10 Jul 2018 18:30: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.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 688E9292A5 for ; Tue, 10 Jul 2018 18:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388129AbeGJSan (ORCPT ); Tue, 10 Jul 2018 14:30:43 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:4325 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387446AbeGJSan (ORCPT ); Tue, 10 Jul 2018 14:30:43 -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=1531247432; x=1562783432; h=from:to:cc:subject:date:message-id; bh=3sNx9Zpw7eFEfNcbfi280lMif6I/nGtqEGBMU3pEpSo=; b=pZwig2kLeoE4nt+rKHAAHph+9O0JklNcVt3t59JOUu6z3tPRHpwGwDN+ Jtux4hXnE14nJ6kNsDnZZn7PqLve5+EOclNoqXOSjpi/8vIH0OgjR6cgB n3NF0nLLJUY72sR2SLVurQ3tPlFh9jStbqO0mC6q3keNdMMTXRs8f0qXA 0hGqDJT+8bzKK8+faozDmYGjFo/MdWkdhwt54IlPQHRtZ0AuLSOwd81La MsZTlyAqOjnPV8Di7gJpByZPg8yK8PHIf6RccbpAbvBxGp9rWAlY1SRb7 wlcWKjzudAfgSPBHO1g3g3gsMxcISPVLuuMKXJ8Sn/snJvv6pyndnCgQ3 w==; X-IronPort-AV: E=Sophos;i="5.51,335,1526313600"; d="scan'208";a="84942415" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 11 Jul 2018 02:30:32 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 10 Jul 2018 11:19:33 -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:30:31 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche Subject: [PATCH] RDMA/nes: Suppress warnings about variables that are only used in debug mode Date: Tue, 10 Jul 2018 11:30:31 -0700 Message-Id: <20180710183031.24980-1-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.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 Signed-off-by: Bart Van Assche --- drivers/infiniband/hw/nes/nes_cm.c | 8 ++++---- drivers/infiniband/hw/nes/nes_hw.c | 2 +- drivers/infiniband/hw/nes/nes_utils.c | 2 +- drivers/infiniband/hw/nes/nes_verbs.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 6cdfbf8c5674..64e1edec9b95 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -2567,7 +2567,7 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct tcphdr *tcph; struct nes_cm_info nfo; int skb_handled = 1; - __be32 tmp_daddr, tmp_saddr; + __be32 tmp_daddr __maybe_unused, tmp_saddr __maybe_unused; if (!skb) return 0; @@ -3574,8 +3574,8 @@ static void cm_event_connected(struct nes_cm_event *event) struct nes_v4_quad nes_quad; u32 crc_value; int ret; - struct sockaddr_in *laddr; - struct sockaddr_in *raddr; + struct sockaddr_in *laddr __maybe_unused; + struct sockaddr_in *raddr __maybe_unused; struct sockaddr_in *cm_event_laddr; /* get all our handles */ @@ -3750,7 +3750,7 @@ static void cm_event_reset(struct nes_cm_event *event) struct iw_cm_id *cm_id; struct iw_cm_event cm_event; /* struct nes_cm_info cm_info; */ - int ret; + int ret __maybe_unused; if (!event->cm_node) return; diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index 18a7de1c3923..39a164facf7d 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c @@ -3837,7 +3837,7 @@ void flush_wqes(struct nes_device *nesdev, struct nes_qp *nesqp, struct nes_hw_cqp_wqe *cqp_wqe; u32 sq_code = (NES_IWARP_CQE_MAJOR_FLUSH << 16) | NES_IWARP_CQE_MINOR_FLUSH; u32 rq_code = (NES_IWARP_CQE_MAJOR_FLUSH << 16) | NES_IWARP_CQE_MINOR_FLUSH; - int ret; + int ret __maybe_unused; cqp_request = nes_get_cqp_request(nesdev); if (cqp_request == NULL) { diff --git a/drivers/infiniband/hw/nes/nes_utils.c b/drivers/infiniband/hw/nes/nes_utils.c index 21b4a8373acf..27a6ef1bf9f6 100644 --- a/drivers/infiniband/hw/nes/nes_utils.c +++ b/drivers/infiniband/hw/nes/nes_utils.c @@ -686,7 +686,7 @@ int nes_arp_table(struct nes_device *nesdev, u32 ip_addr, u8 *mac_addr, u32 acti struct nes_adapter *nesadapter = nesdev->nesadapter; int arp_index; int err = 0; - __be32 tmp_addr; + __be32 tmp_addr __maybe_unused; for (arp_index = 0; (u32) arp_index < nesadapter->arp_table_size; arp_index++) { if (nesadapter->arp_table[arp_index].ip_addr == ip_addr) diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 82b8f9630ee8..9c4c1d200253 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -808,7 +808,7 @@ static int nes_setup_virt_qp(struct nes_qp *nesqp, struct nes_pbl *nespbl, __le64 *pblbuffer; struct nes_device *nesdev = nesvnic->nesdev; struct nes_adapter *nesadapter = nesdev->nesadapter; - u32 pbl_entries; + u32 pbl_entries __maybe_unused; u8 rq_pbl_entries; u8 sq_pbl_entries; @@ -2484,7 +2484,7 @@ static int nes_dereg_mr(struct ib_mr *ib_mr) unsigned long flags; int ret; u16 major_code; - u16 minor_code; + u16 minor_code __maybe_unused; if (nesmr->pages)