diff mbox

[-next,2/2] iwlwifi: signedness bug in iwl_trans_pcie_tx_agg_alloc()

Message ID 20110831063830.GD3705@shale.localdomain (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Dan Carpenter Aug. 31, 2011, 6:38 a.m. UTC
unsigned shorts and unsigned chars are never == -1.

Signed-off-by: Dan Carpenter <error27@gmail.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

Guy, Wey-Yi W Aug. 31, 2011, 9:35 a.m. UTC | #1
On Tue, 2011-08-30 at 23:38 -0700, Dan Carpenter wrote:
> unsigned shorts and unsigned chars are never == -1.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
> index 5dd6a6d..ea6a0bc 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
> @@ -535,7 +535,7 @@ int iwl_trans_pcie_tx_agg_alloc(struct iwl_trans *trans,
>  	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
>  	struct iwl_tid_data *tid_data;
>  	unsigned long flags;
> -	u16 txq_id;
> +	int txq_id;
>  	struct iwl_priv *priv = priv(trans);
>  
>  	txq_id = iwlagn_txq_ctx_activate_free(trans);

True

Wey


--
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/iwl-trans-tx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
index 5dd6a6d..ea6a0bc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
@@ -535,7 +535,7 @@  int iwl_trans_pcie_tx_agg_alloc(struct iwl_trans *trans,
 	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
 	struct iwl_tid_data *tid_data;
 	unsigned long flags;
-	u16 txq_id;
+	int txq_id;
 	struct iwl_priv *priv = priv(trans);
 
 	txq_id = iwlagn_txq_ctx_activate_free(trans);