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>
このコミットが含まれているのは:
@@ -1594,11 +1594,9 @@ static int fec_enet_init(struct net_device *ndev)
|
||||
|
||||
/* Allocate memory for buffer descriptors. */
|
||||
cbd_base = dma_alloc_coherent(NULL, PAGE_SIZE, &fep->bd_dma,
|
||||
GFP_KERNEL);
|
||||
if (!cbd_base) {
|
||||
printk("FEC: allocate descriptor memory failed?\n");
|
||||
GFP_KERNEL);
|
||||
if (!cbd_base)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
spin_lock_init(&fep->hw_lock);
|
||||
|
||||
|
@@ -245,14 +245,13 @@ static int gfar_alloc_skb_resources(struct net_device *ndev)
|
||||
|
||||
/* Allocate memory for the buffer descriptors */
|
||||
vaddr = dma_alloc_coherent(dev,
|
||||
sizeof(struct txbd8) * priv->total_tx_ring_size +
|
||||
sizeof(struct rxbd8) * priv->total_rx_ring_size,
|
||||
&addr, GFP_KERNEL);
|
||||
if (!vaddr) {
|
||||
netif_err(priv, ifup, ndev,
|
||||
"Could not allocate buffer descriptors!\n");
|
||||
(priv->total_tx_ring_size *
|
||||
sizeof(struct txbd8)) +
|
||||
(priv->total_rx_ring_size *
|
||||
sizeof(struct rxbd8)),
|
||||
&addr, GFP_KERNEL);
|
||||
if (!vaddr)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
for (i = 0; i < priv->num_tx_queues; i++) {
|
||||
tx_queue = priv->tx_queue[i];
|
||||
|
新しいイシューから参照
ユーザーをブロックする