提交 320f422f 编写于 作者: J Joe Perches 提交者: Marek Lindner

batman-adv: Remove unnecessary OOM logging messages

Removing unnecessary messages saves code and text.

Site specific OOM messages are duplications of a generic MM
out of memory message and aren't really useful, so just
delete them.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
上级 45485ad7
...@@ -434,11 +434,8 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev) ...@@ -434,11 +434,8 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
dev_hold(net_dev); dev_hold(net_dev);
hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC); hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC);
if (!hard_iface) { if (!hard_iface)
pr_err("Can't add interface (%s): out of memory\n",
net_dev->name);
goto release_dev; goto release_dev;
}
ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev); ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
if (ret) if (ret)
......
...@@ -117,8 +117,6 @@ int mesh_init(struct net_device *soft_iface) ...@@ -117,8 +117,6 @@ int mesh_init(struct net_device *soft_iface)
goto end; goto end;
err: err:
pr_err("Unable to allocate memory for mesh information structures: "
"out of mem ?\n");
mesh_free(soft_iface); mesh_free(soft_iface);
return -1; return -1;
......
...@@ -492,10 +492,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num) ...@@ -492,10 +492,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
data_ptr = kmalloc(max_if_num * sizeof(unsigned long) * NUM_WORDS, data_ptr = kmalloc(max_if_num * sizeof(unsigned long) * NUM_WORDS,
GFP_ATOMIC); GFP_ATOMIC);
if (!data_ptr) { if (!data_ptr)
pr_err("Can't resize orig: out of memory\n");
return -1; return -1;
}
memcpy(data_ptr, orig_node->bcast_own, memcpy(data_ptr, orig_node->bcast_own,
(max_if_num - 1) * sizeof(unsigned long) * NUM_WORDS); (max_if_num - 1) * sizeof(unsigned long) * NUM_WORDS);
...@@ -503,10 +501,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num) ...@@ -503,10 +501,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
orig_node->bcast_own = data_ptr; orig_node->bcast_own = data_ptr;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC); data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
if (!data_ptr) { if (!data_ptr)
pr_err("Can't resize orig: out of memory\n");
return -1; return -1;
}
memcpy(data_ptr, orig_node->bcast_own_sum, memcpy(data_ptr, orig_node->bcast_own_sum,
(max_if_num - 1) * sizeof(uint8_t)); (max_if_num - 1) * sizeof(uint8_t));
...@@ -561,10 +557,8 @@ static int orig_node_del_if(struct orig_node *orig_node, ...@@ -561,10 +557,8 @@ static int orig_node_del_if(struct orig_node *orig_node,
chunk_size = sizeof(unsigned long) * NUM_WORDS; chunk_size = sizeof(unsigned long) * NUM_WORDS;
data_ptr = kmalloc(max_if_num * chunk_size, GFP_ATOMIC); data_ptr = kmalloc(max_if_num * chunk_size, GFP_ATOMIC);
if (!data_ptr) { if (!data_ptr)
pr_err("Can't resize orig: out of memory\n");
return -1; return -1;
}
/* copy first part */ /* copy first part */
memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size); memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size);
...@@ -582,10 +576,8 @@ static int orig_node_del_if(struct orig_node *orig_node, ...@@ -582,10 +576,8 @@ static int orig_node_del_if(struct orig_node *orig_node,
goto free_own_sum; goto free_own_sum;
data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC); data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
if (!data_ptr) { if (!data_ptr)
pr_err("Can't resize orig: out of memory\n");
return -1; return -1;
}
memcpy(data_ptr, orig_node->bcast_own_sum, memcpy(data_ptr, orig_node->bcast_own_sum,
del_if_num * sizeof(uint8_t)); del_if_num * sizeof(uint8_t));
......
...@@ -801,10 +801,8 @@ struct net_device *softif_create(const char *name) ...@@ -801,10 +801,8 @@ struct net_device *softif_create(const char *name)
soft_iface = alloc_netdev(sizeof(*bat_priv), name, interface_setup); soft_iface = alloc_netdev(sizeof(*bat_priv), name, interface_setup);
if (!soft_iface) { if (!soft_iface)
pr_err("Unable to allocate the batman interface: %s\n", name);
goto out; goto out;
}
ret = register_netdevice(soft_iface); ret = register_netdevice(soft_iface);
if (ret < 0) { if (ret < 0) {
......
...@@ -887,10 +887,8 @@ int vis_init(struct bat_priv *bat_priv) ...@@ -887,10 +887,8 @@ int vis_init(struct bat_priv *bat_priv)
} }
bat_priv->my_vis_info = kmalloc(MAX_VIS_PACKET_SIZE, GFP_ATOMIC); bat_priv->my_vis_info = kmalloc(MAX_VIS_PACKET_SIZE, GFP_ATOMIC);
if (!bat_priv->my_vis_info) { if (!bat_priv->my_vis_info)
pr_err("Can't initialize vis packet\n");
goto err; goto err;
}
bat_priv->my_vis_info->skb_packet = dev_alloc_skb(sizeof(*packet) + bat_priv->my_vis_info->skb_packet = dev_alloc_skb(sizeof(*packet) +
MAX_VIS_PACKET_SIZE + MAX_VIS_PACKET_SIZE +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册