aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-03-14 09:07:21 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-15 08:56:58 -0400
commitd0320f750093d012d3ed69fc1e8b385f654523d5 (patch)
tree1f9c25c892c33275fb85a993e9a274dc5618370b /drivers/net/ethernet/stmicro
parent68c45a2da34cb44962c6a48f8e474ec6b7853641 (diff)
drivers:net: Remove dma_alloc_coherent OOM messages
I believe these error messages are already logged on allocation failure by warn_alloc_failed and so get a dump_stack on OOM. Remove the unnecessary additional error logging. Around these deletions: o Alignment neatening. o Remove unnecessary casts of dma_alloc_coherent. o Hoist assigns from ifs. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 39c6c5524633..d02b446037d7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -534,25 +534,17 @@ static void init_dma_desc_rings(struct net_device *dev)
534 GFP_KERNEL); 534 GFP_KERNEL);
535 priv->rx_skbuff = kmalloc_array(rxsize, sizeof(struct sk_buff *), 535 priv->rx_skbuff = kmalloc_array(rxsize, sizeof(struct sk_buff *),
536 GFP_KERNEL); 536 GFP_KERNEL);
537 priv->dma_rx = 537 priv->dma_rx = dma_alloc_coherent(priv->device,
538 (struct dma_desc *)dma_alloc_coherent(priv->device, 538 rxsize * sizeof(struct dma_desc),
539 rxsize * 539 &priv->dma_rx_phy, GFP_KERNEL);
540 sizeof(struct dma_desc),
541 &priv->dma_rx_phy,
542 GFP_KERNEL);
543 priv->tx_skbuff = kmalloc_array(txsize, sizeof(struct sk_buff *), 540 priv->tx_skbuff = kmalloc_array(txsize, sizeof(struct sk_buff *),
544 GFP_KERNEL); 541 GFP_KERNEL);
545 priv->dma_tx = 542 priv->dma_tx = dma_alloc_coherent(priv->device,
546 (struct dma_desc *)dma_alloc_coherent(priv->device, 543 txsize * sizeof(struct dma_desc),
547 txsize * 544 &priv->dma_tx_phy, GFP_KERNEL);
548 sizeof(struct dma_desc), 545
549 &priv->dma_tx_phy, 546 if ((priv->dma_rx == NULL) || (priv->dma_tx == NULL))
550 GFP_KERNEL);
551
552 if ((priv->dma_rx == NULL) || (priv->dma_tx == NULL)) {
553 pr_err("%s:ERROR allocating the DMA Tx/Rx desc\n", __func__);
554 return; 547 return;
555 }
556 548
557 DBG(probe, INFO, "stmmac (%s) DMA desc: virt addr (Rx %p, " 549 DBG(probe, INFO, "stmmac (%s) DMA desc: virt addr (Rx %p, "
558 "Tx %p)\n\tDMA phy addr (Rx 0x%08x, Tx 0x%08x)\n", 550 "Tx %p)\n\tDMA phy addr (Rx 0x%08x, Tx 0x%08x)\n",