iwlwifi: iwl_tx_queue_alloc : fix warning in printk formatting
authorWinkler, Tomas <tomas.winkler@intel.com>
Fri, 23 Jan 2009 21:45:23 +0000 (13:45 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 29 Jan 2009 21:01:45 +0000 (16:01 -0500)
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>
drivers/net/wireless/iwlwifi/iwl-tx.c

index 58118c8224cf8dd51663bdb63ac377dced22097e..7d2b6e11f73e0d21c280264c1d0866abe9954458 100644 (file)
@@ -278,6 +278,7 @@ static int iwl_tx_queue_alloc(struct iwl_priv *priv,
                              struct iwl_tx_queue *txq, u32 id)
 {
        struct pci_dev *dev = priv->pci_dev;
+       size_t tfd_sz = priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX;
 
        /* Driver private data, only for Tx (not command) queues,
         * not shared with device. */
@@ -289,18 +290,16 @@ static int iwl_tx_queue_alloc(struct iwl_priv *priv,
                                  "structures failed\n");
                        goto error;
                }
-       } else
+       } else {
                txq->txb = NULL;
+       }
 
        /* Circular buffer of transmit frame descriptors (TFDs),
         * shared with device */
-       txq->tfds = pci_alloc_consistent(dev,
-                       priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX,
-                       &txq->q.dma_addr);
+       txq->tfds = pci_alloc_consistent(dev, tfd_sz, &txq->q.dma_addr);
 
        if (!txq->tfds) {
-               IWL_ERR(priv, "pci_alloc_consistent(%zd) failed\n",
-                         priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX);
+               IWL_ERR(priv, "pci_alloc_consistent(%zd) failed\n", tfd_sz);
                goto error;
        }
        txq->q.id = id;