Rami Rosen | 7 Oct 09:47

[PATCH ] [RESEND] 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@...>
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);
Tomas Winkler | 7 Oct 09:58

Re: [PATCH ] [RESEND] iwlwifi: fix compilation warning when CONFIG_IWLWIFI_DEBUG is not set.

On Tue, Oct 7, 2008 at 9:50 AM, Rami Rosen <ramirose@...> wrote:
> 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@...>
>
ACK
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane