iwlwifi: fix compilation warning when CONFIG_IWLWIFI_DEBUG is not set.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, October 16, 2008 - 12:14 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=45527c...
Commit:     45527c2c4f698f8927239cfdec9f515cafed5f10
Parent:     746db510395e32ff57b9f8582e520df6b3fac618
Author:     Rami Rosen <ramirose@gmail.com>
AuthorDate: Tue Oct 7 09:50:01 2008 +0200
Committer:  John W. Linville <linville@tuxdriver.com>
CommitDate: Tue Oct 14 20:46:26 2008 -0400

    iwlwifi: fix compilation warning when CONFIG_IWLWIFI_DEBUG is not set.
    
    When CONFIG_IWLWIFI_DEBUG is not set and CONFIG_IWLWIFI is set,
    we get this compilation warning:
    /wireless-next-2.6/drivers/net/wireless/iwlwifi/iwl-agn-rs.c: In
    function 'rs_free_sta':
    /wireless-next-2.6/drivers/net/wireless/iwlwifi/iwl-agn-rs.c:2425:
    warning: unused variable 'priv'
    
    This patch fixes it by adding __maybe_unused attribute.
    
    Signed-off-by: Rami Rosen <ramirose@gmail.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 93944de..e2a58e4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2422,7 +2422,7 @@ static void rs_free_sta(void *priv_r, struct ieee80211_sta *sta,
 			void *priv_sta)
 {
 	struct iwl_lq_sta *lq_sta = priv_sta;
-	struct iwl_priv *priv = priv_r;
+	struct iwl_priv *priv __maybe_unused = priv_r;
 
 	IWL_DEBUG_RATE("enter\n");
 	kfree(lq_sta);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
iwlwifi: fix compilation warning when CONFIG_IWLWIFI_DEBUG ..., Linux Kernel Mailing ..., (Thu Oct 16, 12:14 pm)