From 6ca6ebc1606c6fa7e8931445e84f21f4843e3bab Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Wed, 14 Nov 2012 23:38:08 +0200 Subject: iwlwifi: make iwl_queue_used return bool Also, prefer the if(!X) notation over if(X == 0). Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- drivers/net/wireless/iwlwifi/pcie/tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/pcie/tx.c') diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c index ba2a78c150bb..40e5a6d6e6d3 100644 --- a/drivers/net/wireless/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/iwlwifi/pcie/tx.c @@ -918,7 +918,7 @@ void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn, * the last we will free. This one must be used */ last_to_free = iwl_queue_dec_wrap(tfd_num, q->n_bd); - if (iwl_queue_used(q, last_to_free) == 0) { + if (!iwl_queue_used(q, last_to_free)) { IWL_ERR(trans, "%s: Read index for DMA queue txq id (%d), last_to_free %d is out of range [0-%d] %d %d.\n", __func__, txq_id, last_to_free, q->n_bd, @@ -969,7 +969,7 @@ static void iwl_pcie_cmdq_reclaim(struct iwl_trans *trans, int txq_id, int idx) lockdep_assert_held(&txq->lock); - if ((idx >= q->n_bd) || (iwl_queue_used(q, idx) == 0)) { + if ((idx >= q->n_bd) || (!iwl_queue_used(q, idx))) { IWL_ERR(trans, "%s: Read index for DMA queue txq id (%d), index %d is out of range [0-%d] %d %d.\n", __func__, txq_id, idx, q->n_bd, -- cgit v1.2.3