iwlwifi: fix compilation warning when CONFIG_IWLWIFI_DEBUG is not set.
authorRami Rosen <ramirose@gmail.com>
Tue, 7 Oct 2008 07:50:01 +0000 (09:50 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 15 Oct 2008 00:46:26 +0000 (20:46 -0400)
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

index 93944de923cafd0913979e1f45bf8a36023d2285..e2a58e477036e611da5ffc78abeda5748f7392ce 100644 (file)
@@ -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);