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>
This commit is contained in:
Winkler, Tomas 2009-01-23 13:45:23 -08:00 коммит произвёл John W. Linville
Родитель c771c9d8da
Коммит 3978e5bce6
1 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

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