aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/translation-table.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-05-11 20:09:34 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-20 16:15:23 -0400
commit7d211efc5087bc8870fa3374da88b4bf8159e79b (patch)
tree1cd6c7b6543610f7e684ac20988735c7c6d1c8fa /net/batman-adv/translation-table.c
parent9039dc7e8a42864744665bf0905f48c2724f6e3e (diff)
batman-adv: Prefix originator non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that case the linker will see all non-static symbols of batman-adv and all other non-static symbols of the kernel. This could lead to symbol collisions. A prefix for the batman-adv symbols that defines their private namespace avoids such a problem. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r--net/batman-adv/translation-table.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index a7cbc915afef..3d2c3b142cf1 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -142,7 +142,7 @@ static void tt_orig_list_entry_free_rcu(struct rcu_head *rcu)
142 142
143 orig_entry = container_of(rcu, struct tt_orig_list_entry, rcu); 143 orig_entry = container_of(rcu, struct tt_orig_list_entry, rcu);
144 atomic_dec(&orig_entry->orig_node->tt_size); 144 atomic_dec(&orig_entry->orig_node->tt_size);
145 orig_node_free_ref(orig_entry->orig_node); 145 batadv_orig_node_free_ref(orig_entry->orig_node);
146 kfree(orig_entry); 146 kfree(orig_entry);
147} 147}
148 148
@@ -1080,7 +1080,7 @@ struct orig_node *transtable_search(struct bat_priv *bat_priv,
1080 rcu_read_lock(); 1080 rcu_read_lock();
1081 head = &tt_global_entry->orig_list; 1081 head = &tt_global_entry->orig_list;
1082 hlist_for_each_entry_rcu(orig_entry, node, head, list) { 1082 hlist_for_each_entry_rcu(orig_entry, node, head, list) {
1083 router = orig_node_get_router(orig_entry->orig_node); 1083 router = batadv_orig_node_get_router(orig_entry->orig_node);
1084 if (!router) 1084 if (!router)
1085 continue; 1085 continue;
1086 1086
@@ -1088,7 +1088,7 @@ struct orig_node *transtable_search(struct bat_priv *bat_priv,
1088 orig_node = orig_entry->orig_node; 1088 orig_node = orig_entry->orig_node;
1089 best_tq = router->tq_avg; 1089 best_tq = router->tq_avg;
1090 } 1090 }
1091 neigh_node_free_ref(router); 1091 batadv_neigh_node_free_ref(router);
1092 } 1092 }
1093 /* found anything? */ 1093 /* found anything? */
1094 if (orig_node && !atomic_inc_not_zero(&orig_node->refcount)) 1094 if (orig_node && !atomic_inc_not_zero(&orig_node->refcount))
@@ -1395,7 +1395,7 @@ static int send_tt_request(struct bat_priv *bat_priv,
1395 if (full_table) 1395 if (full_table)
1396 tt_request->flags |= TT_FULL_TABLE; 1396 tt_request->flags |= TT_FULL_TABLE;
1397 1397
1398 neigh_node = orig_node_get_router(dst_orig_node); 1398 neigh_node = batadv_orig_node_get_router(dst_orig_node);
1399 if (!neigh_node) 1399 if (!neigh_node)
1400 goto out; 1400 goto out;
1401 1401
@@ -1411,7 +1411,7 @@ static int send_tt_request(struct bat_priv *bat_priv,
1411 1411
1412out: 1412out:
1413 if (neigh_node) 1413 if (neigh_node)
1414 neigh_node_free_ref(neigh_node); 1414 batadv_neigh_node_free_ref(neigh_node);
1415 if (primary_if) 1415 if (primary_if)
1416 hardif_free_ref(primary_if); 1416 hardif_free_ref(primary_if);
1417 if (ret) 1417 if (ret)
@@ -1453,7 +1453,7 @@ static bool send_other_tt_response(struct bat_priv *bat_priv,
1453 if (!res_dst_orig_node) 1453 if (!res_dst_orig_node)
1454 goto out; 1454 goto out;
1455 1455
1456 neigh_node = orig_node_get_router(res_dst_orig_node); 1456 neigh_node = batadv_orig_node_get_router(res_dst_orig_node);
1457 if (!neigh_node) 1457 if (!neigh_node)
1458 goto out; 1458 goto out;
1459 1459
@@ -1541,11 +1541,11 @@ unlock:
1541 1541
1542out: 1542out:
1543 if (res_dst_orig_node) 1543 if (res_dst_orig_node)
1544 orig_node_free_ref(res_dst_orig_node); 1544 batadv_orig_node_free_ref(res_dst_orig_node);
1545 if (req_dst_orig_node) 1545 if (req_dst_orig_node)
1546 orig_node_free_ref(req_dst_orig_node); 1546 batadv_orig_node_free_ref(req_dst_orig_node);
1547 if (neigh_node) 1547 if (neigh_node)
1548 neigh_node_free_ref(neigh_node); 1548 batadv_neigh_node_free_ref(neigh_node);
1549 if (primary_if) 1549 if (primary_if)
1550 hardif_free_ref(primary_if); 1550 hardif_free_ref(primary_if);
1551 if (!ret) 1551 if (!ret)
@@ -1580,7 +1580,7 @@ static bool send_my_tt_response(struct bat_priv *bat_priv,
1580 if (!orig_node) 1580 if (!orig_node)
1581 goto out; 1581 goto out;
1582 1582
1583 neigh_node = orig_node_get_router(orig_node); 1583 neigh_node = batadv_orig_node_get_router(orig_node);
1584 if (!neigh_node) 1584 if (!neigh_node)
1585 goto out; 1585 goto out;
1586 1586
@@ -1658,9 +1658,9 @@ unlock:
1658 spin_unlock_bh(&bat_priv->tt_buff_lock); 1658 spin_unlock_bh(&bat_priv->tt_buff_lock);
1659out: 1659out:
1660 if (orig_node) 1660 if (orig_node)
1661 orig_node_free_ref(orig_node); 1661 batadv_orig_node_free_ref(orig_node);
1662 if (neigh_node) 1662 if (neigh_node)
1663 neigh_node_free_ref(neigh_node); 1663 batadv_neigh_node_free_ref(neigh_node);
1664 if (primary_if) 1664 if (primary_if)
1665 hardif_free_ref(primary_if); 1665 hardif_free_ref(primary_if);
1666 if (!ret) 1666 if (!ret)
@@ -1738,7 +1738,7 @@ static void tt_fill_gtable(struct bat_priv *bat_priv,
1738 1738
1739out: 1739out:
1740 if (orig_node) 1740 if (orig_node)
1741 orig_node_free_ref(orig_node); 1741 batadv_orig_node_free_ref(orig_node);
1742} 1742}
1743 1743
1744static void tt_update_changes(struct bat_priv *bat_priv, 1744static void tt_update_changes(struct bat_priv *bat_priv,
@@ -1818,7 +1818,7 @@ void handle_tt_response(struct bat_priv *bat_priv,
1818 orig_node->tt_poss_change = false; 1818 orig_node->tt_poss_change = false;
1819out: 1819out:
1820 if (orig_node) 1820 if (orig_node)
1821 orig_node_free_ref(orig_node); 1821 batadv_orig_node_free_ref(orig_node);
1822} 1822}
1823 1823
1824int tt_init(struct bat_priv *bat_priv) 1824int tt_init(struct bat_priv *bat_priv)
@@ -1947,7 +1947,7 @@ static void send_roam_adv(struct bat_priv *bat_priv, uint8_t *client,
1947 memcpy(roam_adv_packet->dst, orig_node->orig, ETH_ALEN); 1947 memcpy(roam_adv_packet->dst, orig_node->orig, ETH_ALEN);
1948 memcpy(roam_adv_packet->client, client, ETH_ALEN); 1948 memcpy(roam_adv_packet->client, client, ETH_ALEN);
1949 1949
1950 neigh_node = orig_node_get_router(orig_node); 1950 neigh_node = batadv_orig_node_get_router(orig_node);
1951 if (!neigh_node) 1951 if (!neigh_node)
1952 goto out; 1952 goto out;
1953 1953
@@ -1962,7 +1962,7 @@ static void send_roam_adv(struct bat_priv *bat_priv, uint8_t *client,
1962 1962
1963out: 1963out:
1964 if (neigh_node) 1964 if (neigh_node)
1965 neigh_node_free_ref(neigh_node); 1965 batadv_neigh_node_free_ref(neigh_node);
1966 if (ret) 1966 if (ret)
1967 kfree_skb(skb); 1967 kfree_skb(skb);
1968 return; 1968 return;