[PATCH] RDMA/nes: Suppress warnings about variables that are only used in debug mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx>
---
 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)
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux