From patchwork Mon Jun 20 10:16:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 101076 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C36FEB6F94 for ; Mon, 20 Jun 2011 20:17:36 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753918Ab1FTKR3 (ORCPT ); Mon, 20 Jun 2011 06:17:29 -0400 Received: from narfation.org ([79.140.41.39]:57157 "EHLO v3-1039.vlinux.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753457Ab1FTKR2 (ORCPT ); Mon, 20 Jun 2011 06:17:28 -0400 Received: from sven-desktop.home.narfation.org (bathseba.informatik.tu-chemnitz.de [134.109.192.185]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 11C73940F8; Mon, 20 Jun 2011 12:18:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1308565081; bh=AAOd8TntEgDR0QmH77aVEhbCLVLVBQhKDKyEJMrPObw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=ZVgoKxr/3uanWzmyrP1Z8zMvpdf/hdUALZ0/LpiwKjHpkvWIFjk4CXt+wuNmJF3mZ yz/N3Pt0LvK7CO5DCbfKqswwY+4QLZNaFwmCXDj2w216PO1ZamxAL0xZ4YqGSA0ldl SMSNtGV14lND+49k3oVxn62VdxOCKBzt2sxKW7QI= From: Sven Eckelmann To: davem@davemloft.net Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, Sven Eckelmann Subject: [PATCH 01/12] batman-adv: Move compare_orig to originator.c Date: Mon, 20 Jun 2011 12:16:54 +0200 Message-Id: <1308565025-21293-2-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.5.3 In-Reply-To: <1308565025-21293-1-git-send-email-sven@narfation.org> References: <1308565025-21293-1-git-send-email-sven@narfation.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org compare_orig is only used in context of orig_node which is managed inside originator.c. It is not necessary to keep that function inside the header originator.h. Signed-off-by: Sven Eckelmann --- net/batman-adv/originator.c | 8 ++++++++ net/batman-adv/originator.h | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index a6c35d4..991a6e7 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c @@ -37,6 +37,14 @@ static void start_purge_timer(struct bat_priv *bat_priv) queue_delayed_work(bat_event_workqueue, &bat_priv->orig_work, 1 * HZ); } +/* returns 1 if they are the same originator */ +static int compare_orig(const struct hlist_node *node, const void *data2) +{ + const void *data1 = container_of(node, struct orig_node, hash_entry); + + return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0); +} + int originator_init(struct bat_priv *bat_priv) { if (bat_priv->orig_hash) diff --git a/net/batman-adv/originator.h b/net/batman-adv/originator.h index 8e307af..cfc1f60 100644 --- a/net/batman-adv/originator.h +++ b/net/batman-adv/originator.h @@ -40,14 +40,6 @@ int orig_hash_add_if(struct hard_iface *hard_iface, int max_if_num); int orig_hash_del_if(struct hard_iface *hard_iface, int max_if_num); -/* returns 1 if they are the same originator */ -static inline int compare_orig(const struct hlist_node *node, const void *data2) -{ - const void *data1 = container_of(node, struct orig_node, hash_entry); - - return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0); -} - /* hashfunction to choose an entry in a hash table of given size */ /* hash algorithm from http://en.wikipedia.org/wiki/Hash_table */ static inline int choose_orig(const void *data, int32_t size)