aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-08-29 17:17:24 -0400
committerMarek Lindner <lindner_marek@yahoo.de>2011-09-08 11:52:30 -0400
commit320f422f629c7ed5d07b4186aa491d1e11d18a4c (patch)
tree8d32d97b2143abbab7bbbb19e8ef9b6e9235c2c4 /net/batman-adv
parent45485ad7d24f9f1de964b3aea8beb199dbac141c (diff)
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: Joe Perches <joe@perches.com> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/hard-interface.c5
-rw-r--r--net/batman-adv/main.c2
-rw-r--r--net/batman-adv/originator.c16
-rw-r--r--net/batman-adv/soft-interface.c4
-rw-r--r--net/batman-adv/vis.c4
5 files changed, 7 insertions, 24 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 0cc0f04bf397..7704df468e0b 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -434,11 +434,8 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
434 dev_hold(net_dev); 434 dev_hold(net_dev);
435 435
436 hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC); 436 hard_iface = kmalloc(sizeof(*hard_iface), GFP_ATOMIC);
437 if (!hard_iface) { 437 if (!hard_iface)
438 pr_err("Can't add interface (%s): out of memory\n",
439 net_dev->name);
440 goto release_dev; 438 goto release_dev;
441 }
442 439
443 ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev); 440 ret = sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
444 if (ret) 441 if (ret)
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 79b9ae522ce9..fb87bdc2ce9b 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -117,8 +117,6 @@ int mesh_init(struct net_device *soft_iface)
117 goto end; 117 goto end;
118 118
119err: 119err:
120 pr_err("Unable to allocate memory for mesh information structures: "
121 "out of mem ?\n");
122 mesh_free(soft_iface); 120 mesh_free(soft_iface);
123 return -1; 121 return -1;
124 122
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index cd7d2566ff5f..0e5b77255d99 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -492,10 +492,8 @@ static int orig_node_add_if(struct orig_node *orig_node, int max_if_num)
492 492
493 data_ptr = kmalloc(max_if_num * sizeof(unsigned long) * NUM_WORDS, 493 data_ptr = kmalloc(max_if_num * sizeof(unsigned long) * NUM_WORDS,
494 GFP_ATOMIC); 494 GFP_ATOMIC);
495 if (!data_ptr) { 495 if (!data_ptr)
496 pr_err("Can't resize orig: out of memory\n");
497 return -1; 496 return -1;
498 }
499 497
500 memcpy(data_ptr, orig_node->bcast_own, 498 memcpy(data_ptr, orig_node->bcast_own,
501 (max_if_num - 1) * sizeof(unsigned long) * NUM_WORDS); 499 (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 orig_node->bcast_own = data_ptr; 501 orig_node->bcast_own = data_ptr;
504 502
505 data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC); 503 data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
506 if (!data_ptr) { 504 if (!data_ptr)
507 pr_err("Can't resize orig: out of memory\n");
508 return -1; 505 return -1;
509 }
510 506
511 memcpy(data_ptr, orig_node->bcast_own_sum, 507 memcpy(data_ptr, orig_node->bcast_own_sum,
512 (max_if_num - 1) * sizeof(uint8_t)); 508 (max_if_num - 1) * sizeof(uint8_t));
@@ -561,10 +557,8 @@ static int orig_node_del_if(struct orig_node *orig_node,
561 557
562 chunk_size = sizeof(unsigned long) * NUM_WORDS; 558 chunk_size = sizeof(unsigned long) * NUM_WORDS;
563 data_ptr = kmalloc(max_if_num * chunk_size, GFP_ATOMIC); 559 data_ptr = kmalloc(max_if_num * chunk_size, GFP_ATOMIC);
564 if (!data_ptr) { 560 if (!data_ptr)
565 pr_err("Can't resize orig: out of memory\n");
566 return -1; 561 return -1;
567 }
568 562
569 /* copy first part */ 563 /* copy first part */
570 memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size); 564 memcpy(data_ptr, orig_node->bcast_own, del_if_num * chunk_size);
@@ -582,10 +576,8 @@ free_bcast_own:
582 goto free_own_sum; 576 goto free_own_sum;
583 577
584 data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC); 578 data_ptr = kmalloc(max_if_num * sizeof(uint8_t), GFP_ATOMIC);
585 if (!data_ptr) { 579 if (!data_ptr)
586 pr_err("Can't resize orig: out of memory\n");
587 return -1; 580 return -1;
588 }
589 581
590 memcpy(data_ptr, orig_node->bcast_own_sum, 582 memcpy(data_ptr, orig_node->bcast_own_sum,
591 del_if_num * sizeof(uint8_t)); 583 del_if_num * sizeof(uint8_t));
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 7d8332ec44d0..aceeabc2ca86 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -801,10 +801,8 @@ struct net_device *softif_create(const char *name)
801 801
802 soft_iface = alloc_netdev(sizeof(*bat_priv), name, interface_setup); 802 soft_iface = alloc_netdev(sizeof(*bat_priv), name, interface_setup);
803 803
804 if (!soft_iface) { 804 if (!soft_iface)
805 pr_err("Unable to allocate the batman interface: %s\n", name);
806 goto out; 805 goto out;
807 }
808 806
809 ret = register_netdevice(soft_iface); 807 ret = register_netdevice(soft_iface);
810 if (ret < 0) { 808 if (ret < 0) {
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index fb9b19fc638d..f81a6b668b0c 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -887,10 +887,8 @@ int vis_init(struct bat_priv *bat_priv)
887 } 887 }
888 888
889 bat_priv->my_vis_info = kmalloc(MAX_VIS_PACKET_SIZE, GFP_ATOMIC); 889 bat_priv->my_vis_info = kmalloc(MAX_VIS_PACKET_SIZE, GFP_ATOMIC);
890 if (!bat_priv->my_vis_info) { 890 if (!bat_priv->my_vis_info)
891 pr_err("Can't initialize vis packet\n");
892 goto err; 891 goto err;
893 }
894 892
895 bat_priv->my_vis_info->skb_packet = dev_alloc_skb(sizeof(*packet) + 893 bat_priv->my_vis_info->skb_packet = dev_alloc_skb(sizeof(*packet) +
896 MAX_VIS_PACKET_SIZE + 894 MAX_VIS_PACKET_SIZE +