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/xilinx | |
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/xilinx')
-rw-r--r-- | drivers/net/ethernet/xilinx/ll_temac_main.c | 11 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 10 |
2 files changed, 5 insertions, 16 deletions
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 5ac43e4ace25..a64a6d74a5c8 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c | |||
@@ -246,19 +246,14 @@ static int temac_dma_bd_init(struct net_device *ndev) | |||
246 | lp->tx_bd_v = dma_alloc_coherent(ndev->dev.parent, | 246 | lp->tx_bd_v = dma_alloc_coherent(ndev->dev.parent, |
247 | sizeof(*lp->tx_bd_v) * TX_BD_NUM, | 247 | sizeof(*lp->tx_bd_v) * TX_BD_NUM, |
248 | &lp->tx_bd_p, GFP_KERNEL); | 248 | &lp->tx_bd_p, GFP_KERNEL); |
249 | if (!lp->tx_bd_v) { | 249 | if (!lp->tx_bd_v) |
250 | dev_err(&ndev->dev, | ||
251 | "unable to allocate DMA TX buffer descriptors"); | ||
252 | goto out; | 250 | goto out; |
253 | } | 251 | |
254 | lp->rx_bd_v = dma_alloc_coherent(ndev->dev.parent, | 252 | lp->rx_bd_v = dma_alloc_coherent(ndev->dev.parent, |
255 | sizeof(*lp->rx_bd_v) * RX_BD_NUM, | 253 | sizeof(*lp->rx_bd_v) * RX_BD_NUM, |
256 | &lp->rx_bd_p, GFP_KERNEL); | 254 | &lp->rx_bd_p, GFP_KERNEL); |
257 | if (!lp->rx_bd_v) { | 255 | if (!lp->rx_bd_v) |
258 | dev_err(&ndev->dev, | ||
259 | "unable to allocate DMA RX buffer descriptors"); | ||
260 | goto out; | 256 | goto out; |
261 | } | ||
262 | 257 | ||
263 | memset(lp->tx_bd_v, 0, sizeof(*lp->tx_bd_v) * TX_BD_NUM); | 258 | memset(lp->tx_bd_v, 0, sizeof(*lp->tx_bd_v) * TX_BD_NUM); |
264 | for (i = 0; i < TX_BD_NUM; i++) { | 259 | for (i = 0; i < TX_BD_NUM; i++) { |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 397d4a6a1f30..c238f980e28e 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |||
@@ -205,21 +205,15 @@ static int axienet_dma_bd_init(struct net_device *ndev) | |||
205 | sizeof(*lp->tx_bd_v) * TX_BD_NUM, | 205 | sizeof(*lp->tx_bd_v) * TX_BD_NUM, |
206 | &lp->tx_bd_p, | 206 | &lp->tx_bd_p, |
207 | GFP_KERNEL); | 207 | GFP_KERNEL); |
208 | if (!lp->tx_bd_v) { | 208 | if (!lp->tx_bd_v) |
209 | dev_err(&ndev->dev, "unable to allocate DMA Tx buffer " | ||
210 | "descriptors"); | ||
211 | goto out; | 209 | goto out; |
212 | } | ||
213 | 210 | ||
214 | lp->rx_bd_v = dma_alloc_coherent(ndev->dev.parent, | 211 | lp->rx_bd_v = dma_alloc_coherent(ndev->dev.parent, |
215 | sizeof(*lp->rx_bd_v) * RX_BD_NUM, | 212 | sizeof(*lp->rx_bd_v) * RX_BD_NUM, |
216 | &lp->rx_bd_p, | 213 | &lp->rx_bd_p, |
217 | GFP_KERNEL); | 214 | GFP_KERNEL); |
218 | if (!lp->rx_bd_v) { | 215 | if (!lp->rx_bd_v) |
219 | dev_err(&ndev->dev, "unable to allocate DMA Rx buffer " | ||
220 | "descriptors"); | ||
221 | goto out; | 216 | goto out; |
222 | } | ||
223 | 217 | ||
224 | memset(lp->tx_bd_v, 0, sizeof(*lp->tx_bd_v) * TX_BD_NUM); | 218 | memset(lp->tx_bd_v, 0, sizeof(*lp->tx_bd_v) * TX_BD_NUM); |
225 | for (i = 0; i < TX_BD_NUM; i++) { | 219 | for (i = 0; i < TX_BD_NUM; i++) { |