batman-adv: remove unused parameters
authorSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Wed, 29 Dec 2010 16:15:19 +0000 (16:15 +0000)
committerSven Eckelmann <sven@narfation.org>
Mon, 31 Jan 2011 13:57:09 +0000 (14:57 +0100)
Some function parameters are obsolete now and can be removed.

Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/originator.c
net/batman-adv/routing.c
net/batman-adv/routing.h
net/batman-adv/send.c

index 6b7fb6b7e6f9b97e3a45b9fce87b7f6ce70faebd..3c5c88926b362509a06e0702c05e96461c172ffb 100644 (file)
@@ -247,7 +247,7 @@ static bool purge_orig_node(struct bat_priv *bat_priv,
                                      orig_node->hna_buff_len);
                        /* update bonding candidates, we could have lost
                         * some candidates. */
-                       update_bonding_candidates(bat_priv, orig_node);
+                       update_bonding_candidates(orig_node);
                }
        }
 
index a8cd3897b7d0580f644c40e6becbc10ea3fff34c..e946dc93b9bd4961d1980d3cdb5b245c139670ec 100644 (file)
@@ -433,8 +433,7 @@ static char count_real_packets(struct ethhdr *ethhdr,
 }
 
 /* copy primary address for bonding */
-static void mark_bonding_address(struct bat_priv *bat_priv,
-                                struct orig_node *orig_node,
+static void mark_bonding_address(struct orig_node *orig_node,
                                 struct orig_node *orig_neigh_node,
                                 struct batman_packet *batman_packet)
 
@@ -447,8 +446,7 @@ static void mark_bonding_address(struct bat_priv *bat_priv,
 }
 
 /* mark possible bond.candidates in the neighbor list */
-void update_bonding_candidates(struct bat_priv *bat_priv,
-                              struct orig_node *orig_node)
+void update_bonding_candidates(struct orig_node *orig_node)
 {
        int candidates;
        int interference_candidate;
@@ -730,9 +728,8 @@ void receive_bat_packet(struct ethhdr *ethhdr,
                update_orig(bat_priv, orig_node, ethhdr, batman_packet,
                            if_incoming, hna_buff, hna_buff_len, is_duplicate);
 
-       mark_bonding_address(bat_priv, orig_node,
-                            orig_neigh_node, batman_packet);
-       update_bonding_candidates(bat_priv, orig_node);
+       mark_bonding_address(orig_node, orig_neigh_node, batman_packet);
+       update_bonding_candidates(orig_node);
 
        /* is single hop (direct) neighbor */
        if (is_single_hop_neigh) {
@@ -866,7 +863,7 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
 }
 
 static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
-                                 struct sk_buff *skb, size_t icmp_len)
+                                 struct sk_buff *skb)
 {
        struct orig_node *orig_node;
        struct icmp_packet *icmp_packet;
@@ -978,7 +975,7 @@ int recv_icmp_packet(struct sk_buff *skb, struct batman_if *recv_if)
 
        /* TTL exceeded */
        if (icmp_packet->ttl < 2)
-               return recv_icmp_ttl_exceeded(bat_priv, skb, hdr_size);
+               return recv_icmp_ttl_exceeded(bat_priv, skb);
 
        ret = NET_RX_DROP;
 
index f108f230bfdbb88476a55a8278b8001f725f0620..725cc3864017afd955f753d966a652eb200d3414 100644 (file)
@@ -42,7 +42,6 @@ int recv_vis_packet(struct sk_buff *skb, struct batman_if *recv_if);
 int recv_bat_packet(struct sk_buff *skb, struct batman_if *recv_if);
 struct neigh_node *find_router(struct bat_priv *bat_priv,
                struct orig_node *orig_node, struct batman_if *recv_if);
-void update_bonding_candidates(struct bat_priv *bat_priv,
-                              struct orig_node *orig_node);
+void update_bonding_candidates(struct orig_node *orig_node);
 
 #endif /* _NET_BATMAN_ADV_ROUTING_H_ */
index b89b9f7709ae7d30f6929a405d2e74be82856343..77f82972144e171a47486c6115fab8626131ef14 100644 (file)
@@ -49,7 +49,7 @@ static unsigned long own_send_time(struct bat_priv *bat_priv)
 }
 
 /* when do we schedule a forwarded packet to be sent */
-static unsigned long forward_send_time(struct bat_priv *bat_priv)
+static unsigned long forward_send_time(void)
 {
        return jiffies + msecs_to_jiffies(random32() % (JITTER/2));
 }
@@ -356,7 +356,7 @@ void schedule_forward_packet(struct orig_node *orig_node,
        else
                batman_packet->flags &= ~DIRECTLINK;
 
-       send_time = forward_send_time(bat_priv);
+       send_time = forward_send_time();
        add_bat_packet_to_list(bat_priv,
                               (unsigned char *)batman_packet,
                               sizeof(struct batman_packet) + hna_buff_len,