iwlwifi: pcie: make unused queue warning more readable
authorJohannes Berg <johannes.berg@intel.com>
Thu, 4 Jul 2013 16:00:08 +0000 (18:00 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 16 Jul 2013 10:14:53 +0000 (13:14 +0300)
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>
drivers/net/wireless/iwlwifi/pcie/tx.c

index c47c92165aba91d2e97631f1953bd4e480cabad7..134f7a109f47697e044e950e6b587b231e428cf9 100644 (file)
@@ -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);