From patchwork Thu Jan 27 14:34:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 745 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id AA6A415438F for ; Thu, 27 Jan 2011 15:34:21 +0100 (CET) Received: from sven-desktop.home.narfation.org (i59F6B335.versanet.de [89.246.179.53]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 8870294061; Thu, 27 Jan 2011 15:34:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1296138892; bh=OoTS+5UWWczDX+Ai8hzIyv+KyV0E7TOTzvq1jK9bN7k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=PCYNasSTBG5AjXLWNM4uW/+3+aqKF2C736bBjbbAXb4wB0eydENMV/dluUS2PuIvM 5iv9RjzvIJVEDBXNL2VjHUUoYq0oBD5g2zIKRfqQ/Rx0Yymv6KFWnllK7v1hNK+PlS YHC2+c+xDDRIGa/6OcDslfGaWiHi6bwmyhHXPvhY= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 27 Jan 2011 15:34:13 +0100 Message-Id: <1296138853-17657-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1296136571-13226-5-git-send-email-sven@narfation.org> References: <1296136571-13226-5-git-send-email-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCHv2 4/4] batman-adv: Remove unused variables X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2011 14:34:21 -0000 Signed-off-by: Sven Eckelmann --- Remove best_router_tq which is only in master, but not in next. batman-adv/bat_debugfs.c | 4 +--- batman-adv/routing.c | 10 ---------- 2 files changed, 1 insertions(+), 13 deletions(-) diff --git a/batman-adv/bat_debugfs.c b/batman-adv/bat_debugfs.c index 0ae81d0..d36d305 100644 --- a/batman-adv/bat_debugfs.c +++ b/batman-adv/bat_debugfs.c @@ -52,7 +52,6 @@ static void emit_log_char(struct debug_log *debug_log, char c) static int fdebug_log(struct debug_log *debug_log, char *fmt, ...) { - int printed_len; va_list args; static char debug_log_buf[256]; char *p; @@ -62,8 +61,7 @@ static int fdebug_log(struct debug_log *debug_log, char *fmt, ...) spin_lock_bh(&debug_log->lock); va_start(args, fmt); - printed_len = vscnprintf(debug_log_buf, sizeof(debug_log_buf), - fmt, args); + vscnprintf(debug_log_buf, sizeof(debug_log_buf), fmt, args); va_end(args); for (p = debug_log_buf; *p != 0; p++) diff --git a/batman-adv/routing.c b/batman-adv/routing.c index 6168648..480c178 100644 --- a/batman-adv/routing.c +++ b/batman-adv/routing.c @@ -866,11 +866,9 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv, struct orig_node *orig_node = NULL; struct neigh_node *neigh_node = NULL; struct icmp_packet_rr *icmp_packet; - struct ethhdr *ethhdr; int ret = NET_RX_DROP; icmp_packet = (struct icmp_packet_rr *)skb->data; - ethhdr = (struct ethhdr *)skb_mac_header(skb); /* add data to device queue */ if (icmp_packet->msg_type != ECHO_REQUEST) { @@ -904,7 +902,6 @@ static int recv_my_icmp_packet(struct bat_priv *bat_priv, goto out; icmp_packet = (struct icmp_packet_rr *)skb->data; - ethhdr = (struct ethhdr *)skb_mac_header(skb); memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); memcpy(icmp_packet->orig, @@ -932,11 +929,9 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv, struct orig_node *orig_node = NULL; struct neigh_node *neigh_node = NULL; struct icmp_packet *icmp_packet; - struct ethhdr *ethhdr; int ret = NET_RX_DROP; icmp_packet = (struct icmp_packet *)skb->data; - ethhdr = (struct ethhdr *)skb_mac_header(skb); /* send TTL exceeded if packet is an echo request (traceroute) */ if (icmp_packet->msg_type != ECHO_REQUEST) { @@ -971,7 +966,6 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv, goto out; icmp_packet = (struct icmp_packet *)skb->data; - ethhdr = (struct ethhdr *)skb_mac_header(skb); memcpy(icmp_packet->dst, icmp_packet->orig, ETH_ALEN); memcpy(icmp_packet->orig, @@ -1068,7 +1062,6 @@ int recv_icmp_packet(struct sk_buff *skb, struct batman_if *recv_if) goto out; icmp_packet = (struct icmp_packet_rr *)skb->data; - ethhdr = (struct ethhdr *)skb_mac_header(skb); /* decrement ttl */ icmp_packet->ttl--; @@ -1100,7 +1093,6 @@ struct neigh_node *find_router(struct bat_priv *bat_priv, struct neigh_node *router, *first_candidate, *tmp_neigh_node; static uint8_t zero_mac[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; int bonding_enabled; - int best_router_tq; if (!orig_node) return NULL; @@ -1190,7 +1182,6 @@ struct neigh_node *find_router(struct bat_priv *bat_priv, /* if bonding is disabled, use the best of the * remaining candidates which are not using * this interface. */ - best_router_tq = 0; list_for_each_entry_rcu(tmp_neigh_node, &primary_orig_node->bond_list, bonding_list) { if (!first_candidate) @@ -1203,7 +1194,6 @@ struct neigh_node *find_router(struct bat_priv *bat_priv, if ((!router) || (tmp_neigh_node->tq_avg > router->tq_avg)) { router = tmp_neigh_node; - best_router_tq = 0; } }