aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Wunderlich <siwu@hrz.tu-chemnitz.de>2010-12-29 11:15:19 -0500
committerSven Eckelmann <sven@narfation.org>2011-01-31 08:57:09 -0500
commit74ef115359f5beb565baddfb250f264d9177c108 (patch)
treeaec2314d58563f49438aee5eeeb94531d1815c15
parentae361ce19fa135035c6b83ac1f07090b72fd4b8f (diff)
batman-adv: remove unused parameters
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>
-rw-r--r--net/batman-adv/originator.c2
-rw-r--r--net/batman-adv/routing.c15
-rw-r--r--net/batman-adv/routing.h3
-rw-r--r--net/batman-adv/send.c4
4 files changed, 10 insertions, 14 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 6b7fb6b7e6f9..3c5c88926b36 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -247,7 +247,7 @@ static bool purge_orig_node(struct bat_priv *bat_priv,
247 orig_node->hna_buff_len); 247 orig_node->hna_buff_len);
248 /* update bonding candidates, we could have lost 248 /* update bonding candidates, we could have lost
249 * some candidates. */ 249 * some candidates. */
250 update_bonding_candidates(bat_priv, orig_node); 250 update_bonding_candidates(orig_node);
251 } 251 }
252 } 252 }
253 253
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index a8cd3897b7d0..e946dc93b9bd 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -433,8 +433,7 @@ static char count_real_packets(struct ethhdr *ethhdr,
433} 433}
434 434
435/* copy primary address for bonding */ 435/* copy primary address for bonding */
436static void mark_bonding_address(struct bat_priv *bat_priv, 436static void mark_bonding_address(struct orig_node *orig_node,
437 struct orig_node *orig_node,
438 struct orig_node *orig_neigh_node, 437 struct orig_node *orig_neigh_node,
439 struct batman_packet *batman_packet) 438 struct batman_packet *batman_packet)
440 439
@@ -447,8 +446,7 @@ static void mark_bonding_address(struct bat_priv *bat_priv,
447} 446}
448 447
449/* mark possible bond.candidates in the neighbor list */ 448/* mark possible bond.candidates in the neighbor list */
450void update_bonding_candidates(struct bat_priv *bat_priv, 449void update_bonding_candidates(struct orig_node *orig_node)
451 struct orig_node *orig_node)
452{ 450{
453 int candidates; 451 int candidates;
454 int interference_candidate; 452 int interference_candidate;
@@ -730,9 +728,8 @@ void receive_bat_packet(struct ethhdr *ethhdr,
730 update_orig(bat_priv, orig_node, ethhdr, batman_packet, 728 update_orig(bat_priv, orig_node, ethhdr, batman_packet,
731 if_incoming, hna_buff, hna_buff_len, is_duplicate); 729 if_incoming, hna_buff, hna_buff_len, is_duplicate);
732 730
733 mark_bonding_address(bat_priv, orig_node, 731 mark_bonding_address(orig_node, orig_neigh_node, batman_packet);
734 orig_neigh_node, batman_packet); 732 update_bonding_candidates(orig_node);
735 update_bonding_candidates(bat_priv, orig_node);
736 733
737 /* is single hop (direct) neighbor */ 734 /* is single hop (direct) neighbor */
738 if (is_single_hop_neigh) { 735 if (is_single_hop_neigh) {
@@ -866,7 +863,7 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
866} 863}
867 864
868static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv, 865static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
869 struct sk_buff *skb, size_t icmp_len) 866 struct sk_buff *skb)
870{ 867{
871 struct orig_node *orig_node; 868 struct orig_node *orig_node;
872 struct icmp_packet *icmp_packet; 869 struct icmp_packet *icmp_packet;
@@ -978,7 +975,7 @@ int recv_icmp_packet(struct sk_buff *skb, struct batman_if *recv_if)
978 975
979 /* TTL exceeded */ 976 /* TTL exceeded */
980 if (icmp_packet->ttl < 2) 977 if (icmp_packet->ttl < 2)
981 return recv_icmp_ttl_exceeded(bat_priv, skb, hdr_size); 978 return recv_icmp_ttl_exceeded(bat_priv, skb);
982 979
983 ret = NET_RX_DROP; 980 ret = NET_RX_DROP;
984 981
diff --git a/net/batman-adv/routing.h b/net/batman-adv/routing.h
index f108f230bfdb..725cc3864017 100644
--- a/net/batman-adv/routing.h
+++ b/net/batman-adv/routing.h
@@ -42,7 +42,6 @@ int recv_vis_packet(struct sk_buff *skb, struct batman_if *recv_if);
42int recv_bat_packet(struct sk_buff *skb, struct batman_if *recv_if); 42int recv_bat_packet(struct sk_buff *skb, struct batman_if *recv_if);
43struct neigh_node *find_router(struct bat_priv *bat_priv, 43struct neigh_node *find_router(struct bat_priv *bat_priv,
44 struct orig_node *orig_node, struct batman_if *recv_if); 44 struct orig_node *orig_node, struct batman_if *recv_if);
45void update_bonding_candidates(struct bat_priv *bat_priv, 45void update_bonding_candidates(struct orig_node *orig_node);
46 struct orig_node *orig_node);
47 46
48#endif /* _NET_BATMAN_ADV_ROUTING_H_ */ 47#endif /* _NET_BATMAN_ADV_ROUTING_H_ */
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index b89b9f7709ae..77f82972144e 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -49,7 +49,7 @@ static unsigned long own_send_time(struct bat_priv *bat_priv)
49} 49}
50 50
51/* when do we schedule a forwarded packet to be sent */ 51/* when do we schedule a forwarded packet to be sent */
52static unsigned long forward_send_time(struct bat_priv *bat_priv) 52static unsigned long forward_send_time(void)
53{ 53{
54 return jiffies + msecs_to_jiffies(random32() % (JITTER/2)); 54 return jiffies + msecs_to_jiffies(random32() % (JITTER/2));
55} 55}
@@ -356,7 +356,7 @@ void schedule_forward_packet(struct orig_node *orig_node,
356 else 356 else
357 batman_packet->flags &= ~DIRECTLINK; 357 batman_packet->flags &= ~DIRECTLINK;
358 358
359 send_time = forward_send_time(bat_priv); 359 send_time = forward_send_time();
360 add_bat_packet_to_list(bat_priv, 360 add_bat_packet_to_list(bat_priv,
361 (unsigned char *)batman_packet, 361 (unsigned char *)batman_packet,
362 sizeof(struct batman_packet) + hna_buff_len, 362 sizeof(struct batman_packet) + hna_buff_len,