aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2011-01-27 07:48:54 -0500
committerSven Eckelmann <sven@narfation.org>2011-01-31 08:57:12 -0500
commit1299bdaa1cb522de940d912f661bef59b9a39dd7 (patch)
tree811b2e08c3c8c8a36b59816a5c1c2d3ee4c16005 /net
parentfb86d7648ffdfc8778db2cd70d4bc5c6093e04c5 (diff)
batman-adv: Remove unused variables
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/bat_debugfs.c4
-rw-r--r--net/batman-adv/routing.c7
2 files changed, 1 insertions, 10 deletions
diff --git a/net/batman-adv/bat_debugfs.c b/net/batman-adv/bat_debugfs.c
index 0ae81d07f102..d36d3056ad5d 100644
--- a/net/batman-adv/bat_debugfs.c
+++ b/net/batman-adv/bat_debugfs.c
@@ -52,7 +52,6 @@ static void emit_log_char(struct debug_log *debug_log, char c)
52 52
53static int fdebug_log(struct debug_log *debug_log, char *fmt, ...) 53static int fdebug_log(struct debug_log *debug_log, char *fmt, ...)
54{ 54{
55 int printed_len;
56 va_list args; 55 va_list args;
57 static char debug_log_buf[256]; 56 static char debug_log_buf[256];
58 char *p; 57 char *p;
@@ -62,8 +61,7 @@ static int fdebug_log(struct debug_log *debug_log, char *fmt, ...)
62 61
63 spin_lock_bh(&debug_log->lock); 62 spin_lock_bh(&debug_log->lock);
64 va_start(args, fmt); 63 va_start(args, fmt);
65 printed_len = vscnprintf(debug_log_buf, sizeof(debug_log_buf), 64 vscnprintf(debug_log_buf, sizeof(debug_log_buf), fmt, args);
66 fmt, args);
67 va_end(args); 65 va_end(args);
68 66
69 for (p = debug_log_buf; *p != 0; p++) 67 for (p = debug_log_buf; *p != 0; p++)
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index e946dc93b9bd..3b7e2f7206a8 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -807,13 +807,11 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
807{ 807{
808 struct orig_node *orig_node; 808 struct orig_node *orig_node;
809 struct icmp_packet_rr *icmp_packet; 809 struct icmp_packet_rr *icmp_packet;
810 struct ethhdr *ethhdr;
811 struct batman_if *batman_if; 810 struct batman_if *batman_if;
812 int ret; 811 int ret;
813 uint8_t dstaddr[ETH_ALEN]; 812 uint8_t dstaddr[ETH_ALEN];
814 813
815 icmp_packet = (struct icmp_packet_rr *)skb->data; 814 icmp_packet = (struct icmp_packet_rr *)skb->data;
816 ethhdr = (struct ethhdr *)skb_mac_header(skb);
817 815
818 /* add data to device queue */ 816 /* add data to device queue */
819 if (icmp_packet->msg_type != ECHO_REQUEST) { 817 if (icmp_packet->msg_type != ECHO_REQUEST) {
@@ -845,7 +843,6 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv,
845 return NET_RX_DROP; 843 return NET_RX_DROP;
846 844
847 icmp_packet = (struct icmp_packet_rr *)skb->data; 845 icmp_packet = (struct icmp_packet_rr *)skb->data;
848 ethhdr = (struct ethhdr *)skb_mac_header(skb);
849 846
850 memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); 847 memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN);
851 memcpy(icmp_packet->orig, 848 memcpy(icmp_packet->orig,
@@ -867,13 +864,11 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
867{ 864{
868 struct orig_node *orig_node; 865 struct orig_node *orig_node;
869 struct icmp_packet *icmp_packet; 866 struct icmp_packet *icmp_packet;
870 struct ethhdr *ethhdr;
871 struct batman_if *batman_if; 867 struct batman_if *batman_if;
872 int ret; 868 int ret;
873 uint8_t dstaddr[ETH_ALEN]; 869 uint8_t dstaddr[ETH_ALEN];
874 870
875 icmp_packet = (struct icmp_packet *)skb->data; 871 icmp_packet = (struct icmp_packet *)skb->data;
876 ethhdr = (struct ethhdr *)skb_mac_header(skb);
877 872
878 /* send TTL exceeded if packet is an echo request (traceroute) */ 873 /* send TTL exceeded if packet is an echo request (traceroute) */
879 if (icmp_packet->msg_type != ECHO_REQUEST) { 874 if (icmp_packet->msg_type != ECHO_REQUEST) {
@@ -906,7 +901,6 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
906 return NET_RX_DROP; 901 return NET_RX_DROP;
907 902
908 icmp_packet = (struct icmp_packet *) skb->data; 903 icmp_packet = (struct icmp_packet *) skb->data;
909 ethhdr = (struct ethhdr *)skb_mac_header(skb);
910 904
911 memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); 905 memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN);
912 memcpy(icmp_packet->orig, 906 memcpy(icmp_packet->orig,
@@ -998,7 +992,6 @@ int recv_icmp_packet(struct sk_buff *skb, struct batman_if *recv_if)
998 return NET_RX_DROP; 992 return NET_RX_DROP;
999 993
1000 icmp_packet = (struct icmp_packet_rr *)skb->data; 994 icmp_packet = (struct icmp_packet_rr *)skb->data;
1001 ethhdr = (struct ethhdr *)skb_mac_header(skb);
1002 995
1003 /* decrement ttl */ 996 /* decrement ttl */
1004 icmp_packet->ttl--; 997 icmp_packet->ttl--;