From patchwork Thu Jul 21 23:30:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16565 X-Patchwork-Delegate: sven@narfation.org Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id E317882DD2; Fri, 22 Jul 2016 01:30:17 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=aP6TjF1t; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id CC96882DCD for ; Fri, 22 Jul 2016 01:30:15 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593C0FCF90000000000002E16.dip0.t-ipconnect.de [IPv6:2003:c5:93c0:fcf9::2e16]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 5B81A1100F1; Fri, 22 Jul 2016 01:30:15 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1469143815; bh=CE6Tdc0W7Jn82qUptxJltDzLQckxow5mvOt53MizZ+0=; h=From:To:Cc:Subject:Date:From; b=aP6TjF1tfTWn0ipCv27MzHW/OrbZQheJNLnRTh9hkAbVUWmRypINPRkbMCm3+yCK5 M/a/Cg/KlyrfbUZvq2Kddy0+IGgSM1i1wlQP5Nx2scriwKSV4Sk1j99IAbY/OfZtik d9HWt+xqvmX/TVEumhO6EWflJ3/VBcVuKnHTcg9o= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 22 Jul 2016 01:30:09 +0200 Message-Id: <1469143811-15498-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.8.1 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Remove unused function batadv_hash_delete X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" Signed-off-by: Sven Eckelmann --- net/batman-adv/hash.h | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/net/batman-adv/hash.h b/net/batman-adv/hash.h index cbbf870..557a704 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