diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-11 20:09:32 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:21 -0400 |
commit | 1a8eaf0733ca754533a03d6cfa4463def2b81ce3 (patch) | |
tree | be806212d9109703e0d5d56708ff2efdf65c3d46 /net/batman-adv/hash.h | |
parent | 9563877ea52ea18bb4f1ed724c5e3a39bbbcf60b (diff) |
batman-adv: Prefix hash 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/hash.h')
-rw-r--r-- | net/batman-adv/hash.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/hash.h b/net/batman-adv/hash.h index 3d67ce49fc31..e75df6be4f22 100644 --- a/net/batman-adv/hash.h +++ b/net/batman-adv/hash.h | |||
@@ -43,14 +43,14 @@ struct hashtable_t { | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | /* allocates and clears the hash */ | 45 | /* allocates and clears the hash */ |
46 | struct hashtable_t *hash_new(uint32_t size); | 46 | struct hashtable_t *batadv_hash_new(uint32_t size); |
47 | 47 | ||
48 | /* set class key for all locks */ | 48 | /* set class key for all locks */ |
49 | void batadv_hash_set_lock_class(struct hashtable_t *hash, | 49 | void batadv_hash_set_lock_class(struct hashtable_t *hash, |
50 | struct lock_class_key *key); | 50 | struct lock_class_key *key); |
51 | 51 | ||
52 | /* free only the hashtable and the hash itself. */ | 52 | /* free only the hashtable and the hash itself. */ |
53 | void hash_destroy(struct hashtable_t *hash); | 53 | void batadv_hash_destroy(struct hashtable_t *hash); |
54 | 54 | ||
55 | /* remove the hash structure. if hashdata_free_cb != NULL, this function will be | 55 | /* remove the hash structure. if hashdata_free_cb != NULL, this function will be |
56 | * called to remove the elements inside of the hash. if you don't remove the | 56 | * called to remove the elements inside of the hash. if you don't remove the |
@@ -77,7 +77,7 @@ static inline void hash_delete(struct hashtable_t *hash, | |||
77 | spin_unlock_bh(list_lock); | 77 | spin_unlock_bh(list_lock); |
78 | } | 78 | } |
79 | 79 | ||
80 | hash_destroy(hash); | 80 | batadv_hash_destroy(hash); |
81 | } | 81 | } |
82 | 82 | ||
83 | /** | 83 | /** |