mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 16:53:54 +08:00
net: core: Remove unnecessary alloc/OOM messages
alloc failures already get standardized OOM messages and a dump_stack. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4d9e01da87
commit
62b5942aa5
@ -5958,10 +5958,9 @@ static int netif_alloc_rx_queues(struct net_device *dev)
|
|||||||
BUG_ON(count < 1);
|
BUG_ON(count < 1);
|
||||||
|
|
||||||
rx = kcalloc(count, sizeof(struct netdev_rx_queue), GFP_KERNEL);
|
rx = kcalloc(count, sizeof(struct netdev_rx_queue), GFP_KERNEL);
|
||||||
if (!rx) {
|
if (!rx)
|
||||||
pr_err("netdev: Unable to allocate %u rx queues\n", count);
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
dev->_rx = rx;
|
dev->_rx = rx;
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
@ -5992,10 +5991,9 @@ static int netif_alloc_netdev_queues(struct net_device *dev)
|
|||||||
BUG_ON(count < 1);
|
BUG_ON(count < 1);
|
||||||
|
|
||||||
tx = kcalloc(count, sizeof(struct netdev_queue), GFP_KERNEL);
|
tx = kcalloc(count, sizeof(struct netdev_queue), GFP_KERNEL);
|
||||||
if (!tx) {
|
if (!tx)
|
||||||
pr_err("netdev: Unable to allocate %u tx queues\n", count);
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
dev->_tx = tx;
|
dev->_tx = tx;
|
||||||
|
|
||||||
netdev_for_each_tx_queue(dev, netdev_init_one_queue, NULL);
|
netdev_for_each_tx_queue(dev, netdev_init_one_queue, NULL);
|
||||||
@ -6482,10 +6480,8 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
|
|||||||
alloc_size += NETDEV_ALIGN - 1;
|
alloc_size += NETDEV_ALIGN - 1;
|
||||||
|
|
||||||
p = kzalloc(alloc_size, GFP_KERNEL);
|
p = kzalloc(alloc_size, GFP_KERNEL);
|
||||||
if (!p) {
|
if (!p)
|
||||||
pr_err("alloc_netdev: Unable to allocate device\n");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
dev = PTR_ALIGN(p, NETDEV_ALIGN);
|
dev = PTR_ALIGN(p, NETDEV_ALIGN);
|
||||||
dev->padded = (char *)dev - (char *)p;
|
dev->padded = (char *)dev - (char *)p;
|
||||||
|
@ -69,10 +69,8 @@ static int extend_netdev_table(struct net_device *dev, u32 target_idx)
|
|||||||
|
|
||||||
/* allocate & copy */
|
/* allocate & copy */
|
||||||
new = kzalloc(new_sz, GFP_KERNEL);
|
new = kzalloc(new_sz, GFP_KERNEL);
|
||||||
if (!new) {
|
if (!new)
|
||||||
pr_warn("Unable to alloc new priomap!\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
if (old)
|
if (old)
|
||||||
memcpy(new->priomap, old->priomap,
|
memcpy(new->priomap, old->priomap,
|
||||||
|
Loading…
Reference in New Issue
Block a user