diff mbox

iwlwifi: mvm: rs: fix a warning message

Message ID 20151121103338.GE7002@mwanda (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Dan Carpenter Nov. 21, 2015, 10:33 a.m. UTC
WARN_ON_ONCE() doesn't take a message, it only takes a condition.  I
have changed this to WARN(1, ...).

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Emmanuel Grumbach Nov. 21, 2015, 6:24 p.m. UTC | #1
On 11/21/2015 12:33 PM, Dan Carpenter wrote:
> WARN_ON_ONCE() doesn't take a message, it only takes a condition.  I
> have changed this to WARN(1, ...).
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c
> index d1ad103..58d7bee 100644
> --- a/drivers/net/wireless/iwlwifi/mvm/rs.c
> +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c
> @@ -1827,7 +1827,7 @@ static int rs_switch_to_column(struct iwl_mvm *mvm,
>  		rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2;
>  		rate_mask = lq_sta->active_mimo2_rate;
>  	} else {
> -		WARN_ON_ONCE("Bad column mode");
> +		WARN_ONCE(1, "Bad column mode");
>  	}
>  
>  	if (column->mode != RS_LEGACY) {
>
Ouch - thanks. Clearly, this one doesn't trigger very often :)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c
index d1ad103..58d7bee 100644
--- a/drivers/net/wireless/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/rs.c
@@ -1827,7 +1827,7 @@  static int rs_switch_to_column(struct iwl_mvm *mvm,
 		rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2;
 		rate_mask = lq_sta->active_mimo2_rate;
 	} else {
-		WARN_ON_ONCE("Bad column mode");
+		WARN_ONCE(1, "Bad column mode");
 	}
 
 	if (column->mode != RS_LEGACY) {