]> Pileus Git - ~andy/linux/commitdiff
batman-adv: Move compare_orig to originator.c
authorSven Eckelmann <sven@narfation.org>
Wed, 15 Jun 2011 13:08:59 +0000 (15:08 +0200)
committerSven Eckelmann <sven@narfation.org>
Mon, 20 Jun 2011 08:38:55 +0000 (10:38 +0200)
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 <sven@narfation.org>
net/batman-adv/originator.c
net/batman-adv/originator.h

index a6c35d4e332b95fba0390dac01f499142979712d..991a6e72a9d77dd68dcff08a020fbd7bb74f7511 100644 (file)
@@ -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)
index 8e307af7aa0dd883a9a0e475e743440770aaa0ed..cfc1f60a96a107f6aab51cf9076e3a871c1b947c 100644 (file)
@@ -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)