Browse Source

iwlwifi: pcie: make unused queue warning more readable

Use the return value of WARN_ONCE() and add a message with
the queue ID that's getting used.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 12 years ago
parent
commit
961de6a5ee
1 changed files with 2 additions and 3 deletions
  1. 2 3
      drivers/net/wireless/iwlwifi/pcie/tx.c

+ 2 - 3
drivers/net/wireless/iwlwifi/pcie/tx.c

@@ -1619,10 +1619,9 @@ int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb,
 	txq = &trans_pcie->txq[txq_id];
 	q = &txq->q;
 
-	if (unlikely(!test_bit(txq_id, trans_pcie->queue_used))) {
-		WARN_ON_ONCE(1);
+	if (WARN_ONCE(!test_bit(txq_id, trans_pcie->queue_used),
+		      "TX on unused queue %d\n", txq_id))
 		return -EINVAL;
-	}
 
 	spin_lock(&txq->lock);