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>
This commit is contained in:

committed by
David S. Miller

parent
68c45a2da3
commit
d0320f7500
@@ -637,13 +637,9 @@ static int mal_probe(struct platform_device *ofdev)
|
||||
bd_size = sizeof(struct mal_descriptor) *
|
||||
(NUM_TX_BUFF * mal->num_tx_chans +
|
||||
NUM_RX_BUFF * mal->num_rx_chans);
|
||||
mal->bd_virt =
|
||||
dma_alloc_coherent(&ofdev->dev, bd_size, &mal->bd_dma,
|
||||
GFP_KERNEL);
|
||||
mal->bd_virt = dma_alloc_coherent(&ofdev->dev, bd_size, &mal->bd_dma,
|
||||
GFP_KERNEL);
|
||||
if (mal->bd_virt == NULL) {
|
||||
printk(KERN_ERR
|
||||
"mal%d: out of memory allocating RX/TX descriptors!\n",
|
||||
index);
|
||||
err = -ENOMEM;
|
||||
goto fail_unmap;
|
||||
}
|
||||
|
@@ -556,11 +556,9 @@ static int ibmveth_open(struct net_device *netdev)
|
||||
adapter->rx_queue.queue_len = sizeof(struct ibmveth_rx_q_entry) *
|
||||
rxq_entries;
|
||||
adapter->rx_queue.queue_addr =
|
||||
dma_alloc_coherent(dev, adapter->rx_queue.queue_len,
|
||||
&adapter->rx_queue.queue_dma, GFP_KERNEL);
|
||||
|
||||
dma_alloc_coherent(dev, adapter->rx_queue.queue_len,
|
||||
&adapter->rx_queue.queue_dma, GFP_KERNEL);
|
||||
if (!adapter->rx_queue.queue_addr) {
|
||||
netdev_err(netdev, "unable to allocate rx queue pages\n");
|
||||
rc = -ENOMEM;
|
||||
goto err_out;
|
||||
}
|
||||
|
Reference in New Issue
Block a user