diff options
author | Joe Perches <joe@perches.com> | 2013-03-14 09:07:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-15 08:56:58 -0400 |
commit | d0320f750093d012d3ed69fc1e8b385f654523d5 (patch) | |
tree | 1f9c25c892c33275fb85a993e9a274dc5618370b /drivers/net/ethernet/apple/macmace.c | |
parent | 68c45a2da34cb44962c6a48f8e474ec6b7853641 (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/apple/macmace.c')
-rw-r--r-- | drivers/net/ethernet/apple/macmace.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c index a206779c68cf..4ce8ceb62205 100644 --- a/drivers/net/ethernet/apple/macmace.c +++ b/drivers/net/ethernet/apple/macmace.c | |||
@@ -386,20 +386,16 @@ static int mace_open(struct net_device *dev) | |||
386 | /* Allocate the DMA ring buffers */ | 386 | /* Allocate the DMA ring buffers */ |
387 | 387 | ||
388 | mp->tx_ring = dma_alloc_coherent(mp->device, | 388 | mp->tx_ring = dma_alloc_coherent(mp->device, |
389 | N_TX_RING * MACE_BUFF_SIZE, | 389 | N_TX_RING * MACE_BUFF_SIZE, |
390 | &mp->tx_ring_phys, GFP_KERNEL); | 390 | &mp->tx_ring_phys, GFP_KERNEL); |
391 | if (mp->tx_ring == NULL) { | 391 | if (mp->tx_ring == NULL) |
392 | printk(KERN_ERR "%s: unable to allocate DMA tx buffers\n", dev->name); | ||
393 | goto out1; | 392 | goto out1; |
394 | } | ||
395 | 393 | ||
396 | mp->rx_ring = dma_alloc_coherent(mp->device, | 394 | mp->rx_ring = dma_alloc_coherent(mp->device, |
397 | N_RX_RING * MACE_BUFF_SIZE, | 395 | N_RX_RING * MACE_BUFF_SIZE, |
398 | &mp->rx_ring_phys, GFP_KERNEL); | 396 | &mp->rx_ring_phys, GFP_KERNEL); |
399 | if (mp->rx_ring == NULL) { | 397 | if (mp->rx_ring == NULL) |
400 | printk(KERN_ERR "%s: unable to allocate DMA rx buffers\n", dev->name); | ||
401 | goto out2; | 398 | goto out2; |
402 | } | ||
403 | 399 | ||
404 | mace_dma_off(dev); | 400 | mace_dma_off(dev); |
405 | 401 | ||