diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-12 07:48:55 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-24 12:41:41 -0400 |
commit | c0a559295eb2601602f7dc88f4240afcd666f73a (patch) | |
tree | 1936cd32135d51f0616db90ebc4ee57c34f45790 /net/batman-adv/translation-table.c | |
parent | e5d89254bf763da35b42a3c65289c9962f7240c2 (diff) |
batman-adv: Prefix hash static inline functions with batadv_
All non-static symbols of batman-adv were prefixed with batadv_ to avoid
collisions with other symbols of the kernel. Other symbols of batman-adv
should use the same prefix to keep the naming scheme consistent.
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.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index bc06af4781b3..72a8548515ae 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -234,9 +234,9 @@ void batadv_tt_local_add(struct net_device *soft_iface, const uint8_t *addr, | |||
234 | */ | 234 | */ |
235 | tt_local_entry->common.flags |= TT_CLIENT_NEW; | 235 | tt_local_entry->common.flags |= TT_CLIENT_NEW; |
236 | 236 | ||
237 | hash_added = hash_add(bat_priv->tt_local_hash, compare_tt, choose_orig, | 237 | hash_added = batadv_hash_add(bat_priv->tt_local_hash, compare_tt, |
238 | &tt_local_entry->common, | 238 | choose_orig, &tt_local_entry->common, |
239 | &tt_local_entry->common.hash_entry); | 239 | &tt_local_entry->common.hash_entry); |
240 | 240 | ||
241 | if (unlikely(hash_added != 0)) { | 241 | if (unlikely(hash_added != 0)) { |
242 | /* remove the reference for the hash */ | 242 | /* remove the reference for the hash */ |
@@ -618,6 +618,7 @@ int batadv_tt_global_add(struct bat_priv *bat_priv, struct orig_node *orig_node, | |||
618 | struct tt_global_entry *tt_global_entry = NULL; | 618 | struct tt_global_entry *tt_global_entry = NULL; |
619 | int ret = 0; | 619 | int ret = 0; |
620 | int hash_added; | 620 | int hash_added; |
621 | struct tt_common_entry *common; | ||
621 | 622 | ||
622 | tt_global_entry = tt_global_hash_find(bat_priv, tt_addr); | 623 | tt_global_entry = tt_global_hash_find(bat_priv, tt_addr); |
623 | 624 | ||
@@ -627,18 +628,19 @@ int batadv_tt_global_add(struct bat_priv *bat_priv, struct orig_node *orig_node, | |||
627 | if (!tt_global_entry) | 628 | if (!tt_global_entry) |
628 | goto out; | 629 | goto out; |
629 | 630 | ||
630 | memcpy(tt_global_entry->common.addr, tt_addr, ETH_ALEN); | 631 | common = &tt_global_entry->common; |
632 | memcpy(common->addr, tt_addr, ETH_ALEN); | ||
631 | 633 | ||
632 | tt_global_entry->common.flags = NO_FLAGS; | 634 | common->flags = NO_FLAGS; |
633 | tt_global_entry->roam_at = 0; | 635 | tt_global_entry->roam_at = 0; |
634 | atomic_set(&tt_global_entry->common.refcount, 2); | 636 | atomic_set(&common->refcount, 2); |
635 | 637 | ||
636 | INIT_HLIST_HEAD(&tt_global_entry->orig_list); | 638 | INIT_HLIST_HEAD(&tt_global_entry->orig_list); |
637 | spin_lock_init(&tt_global_entry->list_lock); | 639 | spin_lock_init(&tt_global_entry->list_lock); |
638 | 640 | ||
639 | hash_added = hash_add(bat_priv->tt_global_hash, compare_tt, | 641 | hash_added = batadv_hash_add(bat_priv->tt_global_hash, |
640 | choose_orig, &tt_global_entry->common, | 642 | compare_tt, choose_orig, |
641 | &tt_global_entry->common.hash_entry); | 643 | common, &common->hash_entry); |
642 | 644 | ||
643 | if (unlikely(hash_added != 0)) { | 645 | if (unlikely(hash_added != 0)) { |
644 | /* remove the reference for the hash */ | 646 | /* remove the reference for the hash */ |
@@ -816,8 +818,8 @@ static void tt_global_del_struct(struct bat_priv *bat_priv, | |||
816 | "Deleting global tt entry %pM: %s\n", | 818 | "Deleting global tt entry %pM: %s\n", |
817 | tt_global_entry->common.addr, message); | 819 | tt_global_entry->common.addr, message); |
818 | 820 | ||
819 | hash_remove(bat_priv->tt_global_hash, compare_tt, choose_orig, | 821 | batadv_hash_remove(bat_priv->tt_global_hash, compare_tt, choose_orig, |
820 | tt_global_entry->common.addr); | 822 | tt_global_entry->common.addr); |
821 | tt_global_entry_free_ref(tt_global_entry); | 823 | tt_global_entry_free_ref(tt_global_entry); |
822 | 824 | ||
823 | } | 825 | } |