Return-path: Received: from mail-bw0-f21.google.com ([209.85.218.21]:40236 "EHLO mail-bw0-f21.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758507AbZASMCj convert rfc822-to-8bit (ORCPT ); Mon, 19 Jan 2009 07:02:39 -0500 Received: by bwz14 with SMTP id 14so8220462bwz.13 for ; Mon, 19 Jan 2009 04:02:37 -0800 (PST) Subject: [PATCHv2 1/2] iwl3945: fix some warnings when compiled without debug To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org From: Helmut Schaa Date: Mon, 19 Jan 2009 13:02:15 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Message-Id: <200901191302.15719.Helmut.Schaa@gmx.de> (sfid-20090119_130242_347713_672D7B2E) Sender: linux-wireless-owner@vger.kernel.org List-ID: =46ix the following warnings if compiled without CONFIG_IWLWIFI_DEBUG. drivers/net/wireless/iwlwifi/iwl3945-base.c: In function =E2=80=98iwl39= 45_rx_reply_add_sta=E2=80=99: drivers/net/wireless/iwlwifi/iwl3945-base.c:2748: warning: unused varia= ble =E2=80=98pkt=E2=80=99 drivers/net/wireless/iwlwifi/iwl3945-base.c: In function =E2=80=98iwl39= 45_rx_scan_results_notif=E2=80=99: drivers/net/wireless/iwlwifi/iwl3945-base.c:2903: warning: unused varia= ble =E2=80=98notif=E2=80=99 drivers/net/wireless/iwlwifi/iwl3945-base.c: In function =E2=80=98iwl39= 45_rx_scan_complete_notif=E2=80=99: drivers/net/wireless/iwlwifi/iwl3945-base.c:2928: warning: unused varia= ble =E2=80=98scan_notif=E2=80=99 Signed-off-by: Helmut Schaa --- V2 fixes the indention of preprocessor statements. diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/= wireless/iwlwifi/iwl3945-base.c index b437cac..15d36d8 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_pri= v *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 =3D (void *)rxb->skb->data; +#endif=20 =20 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 i= wl_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 =3D (void *)rxb->skb->data; struct iwl_scanresults_notification *notif =3D (struct iwl_scanresults_notification *)pkt->u.raw; +#endif =20 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 =3D (void *)rxb->skb->data; struct iwl_scancomplete_notification *scan_notif =3D (void *)pkt->u.r= aw; +#endif =20 IWL_DEBUG_SCAN("Scan complete: %d channels (TSF 0x%08X:%08X) - %d\n", scan_notif->scanned_channels, -- To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html