aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/hash.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2016-07-22 01:30:09 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-10-17 16:28:45 +0200
commit739ae86cd2b34ba078cee7492d22283f5500ed19 (patch)
treeb61469858774f317a435415fe65ec2b5f9eaf3d4 /net/batman-adv/hash.h
parentbatman-adv: Document new nc, mcast and tpmeter log levels (diff)
downloadlinux-dev-739ae86cd2b34ba078cee7492d22283f5500ed19.tar.xz
linux-dev-739ae86cd2b34ba078cee7492d22283f5500ed19.zip
batman-adv: Remove unused function batadv_hash_delete
Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/hash.h')
-rw-r--r--net/batman-adv/hash.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/net/batman-adv/hash.h b/net/batman-adv/hash.h
index cbbf87075f06..557a7044cfbc 100644
--- a/net/batman-adv/hash.h
+++ b/net/batman-adv/hash.h
@@ -61,36 +61,6 @@ void batadv_hash_set_lock_class(struct batadv_hashtable *hash,
/* free only the hashtable and the hash itself. */
void batadv_hash_destroy(struct batadv_hashtable *hash);
-/* remove the hash structure. if hashdata_free_cb != NULL, this function will be
- * called to remove the elements inside of the hash. if you don't remove the
- * elements, memory might be leaked.
- */
-static inline void batadv_hash_delete(struct batadv_hashtable *hash,
- batadv_hashdata_free_cb free_cb,
- void *arg)
-{
- struct hlist_head *head;
- struct hlist_node *node, *node_tmp;
- spinlock_t *list_lock; /* spinlock to protect write access */
- u32 i;
-
- for (i = 0; i < hash->size; i++) {
- head = &hash->table[i];
- list_lock = &hash->list_locks[i];
-
- spin_lock_bh(list_lock);
- hlist_for_each_safe(node, node_tmp, head) {
- hlist_del_rcu(node);
-
- if (free_cb)
- free_cb(node, arg);
- }
- spin_unlock_bh(list_lock);
- }
-
- batadv_hash_destroy(hash);
-}
-
/**
* batadv_hash_add - adds data to the hashtable
* @hash: storage hash table