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/marvell/mvneta.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/marvell/mvneta.c')
-rw-r--r-- | drivers/net/ethernet/marvell/mvneta.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index cd345b8969bc..e48261e468f3 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c | |||
@@ -1969,13 +1969,8 @@ static int mvneta_rxq_init(struct mvneta_port *pp, | |||
1969 | rxq->descs = dma_alloc_coherent(pp->dev->dev.parent, | 1969 | rxq->descs = dma_alloc_coherent(pp->dev->dev.parent, |
1970 | rxq->size * MVNETA_DESC_ALIGNED_SIZE, | 1970 | rxq->size * MVNETA_DESC_ALIGNED_SIZE, |
1971 | &rxq->descs_phys, GFP_KERNEL); | 1971 | &rxq->descs_phys, GFP_KERNEL); |
1972 | if (rxq->descs == NULL) { | 1972 | if (rxq->descs == NULL) |
1973 | netdev_err(pp->dev, | ||
1974 | "rxq=%d: Can't allocate %d bytes for %d RX descr\n", | ||
1975 | rxq->id, rxq->size * MVNETA_DESC_ALIGNED_SIZE, | ||
1976 | rxq->size); | ||
1977 | return -ENOMEM; | 1973 | return -ENOMEM; |
1978 | } | ||
1979 | 1974 | ||
1980 | BUG_ON(rxq->descs != | 1975 | BUG_ON(rxq->descs != |
1981 | PTR_ALIGN(rxq->descs, MVNETA_CPU_D_CACHE_LINE_SIZE)); | 1976 | PTR_ALIGN(rxq->descs, MVNETA_CPU_D_CACHE_LINE_SIZE)); |
@@ -2029,13 +2024,8 @@ static int mvneta_txq_init(struct mvneta_port *pp, | |||
2029 | txq->descs = dma_alloc_coherent(pp->dev->dev.parent, | 2024 | txq->descs = dma_alloc_coherent(pp->dev->dev.parent, |
2030 | txq->size * MVNETA_DESC_ALIGNED_SIZE, | 2025 | txq->size * MVNETA_DESC_ALIGNED_SIZE, |
2031 | &txq->descs_phys, GFP_KERNEL); | 2026 | &txq->descs_phys, GFP_KERNEL); |
2032 | if (txq->descs == NULL) { | 2027 | if (txq->descs == NULL) |
2033 | netdev_err(pp->dev, | ||
2034 | "txQ=%d: Can't allocate %d bytes for %d TX descr\n", | ||
2035 | txq->id, txq->size * MVNETA_DESC_ALIGNED_SIZE, | ||
2036 | txq->size); | ||
2037 | return -ENOMEM; | 2028 | return -ENOMEM; |
2038 | } | ||
2039 | 2029 | ||
2040 | /* Make sure descriptor address is cache line size aligned */ | 2030 | /* Make sure descriptor address is cache line size aligned */ |
2041 | BUG_ON(txq->descs != | 2031 | BUG_ON(txq->descs != |