aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-tx.c
diff options
context:
space:
mode:
authorWinkler, Tomas <tomas.winkler@intel.com>2009-01-23 16:45:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:01:45 -0500
commit3978e5bce63484789891c67413372da3915bcbd6 (patch)
tree8269bfb5f792225245126a69267b297d54290d4f /drivers/net/wireless/iwlwifi/iwl-tx.c
parentc771c9d8da1e8292ef8bf7fd4ce135dacc650130 (diff)
iwlwifi: iwl_tx_queue_alloc : fix warning in printk formatting
This patch fix compilation warning in printk formatting iwl_tx_queue_alloc function. Cleanup the code a bit on the way. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 58118c8224cf..7d2b6e11f73e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -278,6 +278,7 @@ static int iwl_tx_queue_alloc(struct iwl_priv *priv,
278 struct iwl_tx_queue *txq, u32 id) 278 struct iwl_tx_queue *txq, u32 id)
279{ 279{
280 struct pci_dev *dev = priv->pci_dev; 280 struct pci_dev *dev = priv->pci_dev;
281 size_t tfd_sz = priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX;
281 282
282 /* Driver private data, only for Tx (not command) queues, 283 /* Driver private data, only for Tx (not command) queues,
283 * not shared with device. */ 284 * not shared with device. */
@@ -289,18 +290,16 @@ static int iwl_tx_queue_alloc(struct iwl_priv *priv,
289 "structures failed\n"); 290 "structures failed\n");
290 goto error; 291 goto error;
291 } 292 }
292 } else 293 } else {
293 txq->txb = NULL; 294 txq->txb = NULL;
295 }
294 296
295 /* Circular buffer of transmit frame descriptors (TFDs), 297 /* Circular buffer of transmit frame descriptors (TFDs),
296 * shared with device */ 298 * shared with device */
297 txq->tfds = pci_alloc_consistent(dev, 299 txq->tfds = pci_alloc_consistent(dev, tfd_sz, &txq->q.dma_addr);
298 priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX,
299 &txq->q.dma_addr);
300 300
301 if (!txq->tfds) { 301 if (!txq->tfds) {
302 IWL_ERR(priv, "pci_alloc_consistent(%zd) failed\n", 302 IWL_ERR(priv, "pci_alloc_consistent(%zd) failed\n", tfd_sz);
303 priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX);
304 goto error; 303 goto error;
305 } 304 }
306 txq->q.id = id; 305 txq->q.id = id;