From c7e035a95d68819491b5250c6854f144c941e305 Mon Sep 17 00:00:00 2001
From: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Mon, 19 Jan 2009 13:02:15 +0100
Subject: [PATCH] iwl3945: fix some warnings when compiled without debug
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix the following warnings if compiled without CONFIG_IWLWIFI_DEBUG.

drivers/net/wireless/iwlwifi/iwl3945-base.c: In function ‘iwl3945_rx_reply_add_sta’:
drivers/net/wireless/iwlwifi/iwl3945-base.c:2748: warning: unused variable ‘pkt’
drivers/net/wireless/iwlwifi/iwl3945-base.c: In function ‘iwl3945_rx_scan_results_notif’:
drivers/net/wireless/iwlwifi/iwl3945-base.c:2903: warning: unused variable ‘notif’
drivers/net/wireless/iwlwifi/iwl3945-base.c: In function ‘iwl3945_rx_scan_complete_notif’:
drivers/net/wireless/iwlwifi/iwl3945-base.c:2928: warning: unused variable ‘scan_notif’

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/iwlwifi/iwl3945-base.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 050d532475ca..b916f00b61bf 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2744,7 +2744,9 @@ static void iwl3945_rx_reply_alive(struct iwl_priv *priv,
 static void iwl3945_rx_reply_add_sta(struct iwl_priv *priv,
 				 struct iwl_rx_mem_buffer *rxb)
 {
+#ifdef CONFIG_IWLWIFI_DEBUG
 	struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
+#endif
 
 	IWL_DEBUG_RX("Received REPLY_ADD_STA: 0x%02X\n", pkt->u.status);
 	return;
@@ -2898,9 +2900,11 @@ static void iwl3945_rx_scan_start_notif(struct iwl_priv *priv,
 static void iwl3945_rx_scan_results_notif(struct iwl_priv *priv,
 				      struct iwl_rx_mem_buffer *rxb)
 {
+#ifdef CONFIG_IWLWIFI_DEBUG
 	struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
 	struct iwl_scanresults_notification *notif =
 	    (struct iwl_scanresults_notification *)pkt->u.raw;
+#endif
 
 	IWL_DEBUG_SCAN("Scan ch.res: "
 		       "%d [802.11%s] "
@@ -2923,8 +2927,10 @@ static void iwl3945_rx_scan_results_notif(struct iwl_priv *priv,
 static void iwl3945_rx_scan_complete_notif(struct iwl_priv *priv,
 				       struct iwl_rx_mem_buffer *rxb)
 {
+#ifdef CONFIG_IWLWIFI_DEBUG
 	struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
 	struct iwl_scancomplete_notification *scan_notif = (void *)pkt->u.raw;
+#endif
 
 	IWL_DEBUG_SCAN("Scan complete: %d channels (TSF 0x%08X:%08X) - %d\n",
 		       scan_notif->scanned_channels,
-- 
2.30.9