From: Rami Rosen Date: Tue, 7 Oct 2008 07:50:01 +0000 (+0200) Subject: iwlwifi: fix compilation warning when CONFIG_IWLWIFI_DEBUG is not set. X-Git-Tag: v2.6.28-rc1~292^2~3^2~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=45527c2c4f698f8927239cfdec9f515cafed5f10;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 93944de923c..e2a58e47703 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);