aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
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/xilinx/xilinx_axienet_main.c
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/xilinx/xilinx_axienet_main.c')
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_axienet_main.c10
1 files changed, 2 insertions, 8 deletions
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++) {