Commit 46d160ef authored by Antonio Quartulli's avatar Antonio Quartulli

batman-adv: remove useless blank lines before and after brackets

Signed-off-by: default avatarAntonio Quartulli <ordex@autistici.org>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
parent dec05074
...@@ -183,7 +183,6 @@ static void batadv_iv_ogm_send_to_if(struct batadv_forw_packet *forw_packet, ...@@ -183,7 +183,6 @@ static void batadv_iv_ogm_send_to_if(struct batadv_forw_packet *forw_packet,
/* adjust all flags and log packets */ /* adjust all flags and log packets */
while (batadv_iv_ogm_aggr_packet(buff_pos, forw_packet->packet_len, while (batadv_iv_ogm_aggr_packet(buff_pos, forw_packet->packet_len,
batadv_ogm_packet->tt_num_changes)) { batadv_ogm_packet->tt_num_changes)) {
/* we might have aggregated direct link packets with an /* we might have aggregated direct link packets with an
* ordinary base packet * ordinary base packet
*/ */
...@@ -261,7 +260,6 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet) ...@@ -261,7 +260,6 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)
*/ */
if ((directlink && (batadv_ogm_packet->header.ttl == 1)) || if ((directlink && (batadv_ogm_packet->header.ttl == 1)) ||
(forw_packet->own && (forw_packet->if_incoming != primary_if))) { (forw_packet->own && (forw_packet->if_incoming != primary_if))) {
/* FIXME: what about aggregated packets ? */ /* FIXME: what about aggregated packets ? */
batadv_dbg(BATADV_DBG_BATMAN, bat_priv, batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
"%s packet (originator %pM, seqno %u, TTL %d) on interface %s [%pM]\n", "%s packet (originator %pM, seqno %u, TTL %d) on interface %s [%pM]\n",
...@@ -325,7 +323,6 @@ batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet, ...@@ -325,7 +323,6 @@ batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet,
if (time_before(send_time, forw_packet->send_time) && if (time_before(send_time, forw_packet->send_time) &&
time_after_eq(aggregation_end_time, forw_packet->send_time) && time_after_eq(aggregation_end_time, forw_packet->send_time) &&
(aggregated_bytes <= BATADV_MAX_AGGREGATION_BYTES)) { (aggregated_bytes <= BATADV_MAX_AGGREGATION_BYTES)) {
/* check aggregation compatibility /* check aggregation compatibility
* -> direct link packets are broadcasted on * -> direct link packets are broadcasted on
* their interface only * their interface only
...@@ -815,7 +812,6 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node, ...@@ -815,7 +812,6 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
rcu_read_lock(); rcu_read_lock();
hlist_for_each_entry_rcu(tmp_neigh_node, node, hlist_for_each_entry_rcu(tmp_neigh_node, node,
&orig_neigh_node->neigh_list, list) { &orig_neigh_node->neigh_list, list) {
if (!batadv_compare_eth(tmp_neigh_node->addr, if (!batadv_compare_eth(tmp_neigh_node->addr,
orig_neigh_node->orig)) orig_neigh_node->orig))
continue; continue;
...@@ -949,7 +945,6 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr, ...@@ -949,7 +945,6 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
rcu_read_lock(); rcu_read_lock();
hlist_for_each_entry_rcu(tmp_neigh_node, node, hlist_for_each_entry_rcu(tmp_neigh_node, node,
&orig_node->neigh_list, list) { &orig_node->neigh_list, list) {
is_duplicate |= batadv_test_bit(tmp_neigh_node->real_bits, is_duplicate |= batadv_test_bit(tmp_neigh_node->real_bits,
orig_node->last_real_seqno, orig_node->last_real_seqno,
seqno); seqno);
...@@ -1223,7 +1218,6 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr, ...@@ -1223,7 +1218,6 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr,
/* is single hop (direct) neighbor */ /* is single hop (direct) neighbor */
if (is_single_hop_neigh) { if (is_single_hop_neigh) {
/* mark direct link on incoming interface */ /* mark direct link on incoming interface */
batadv_iv_ogm_forward(orig_node, ethhdr, batadv_ogm_packet, batadv_iv_ogm_forward(orig_node, ethhdr, batadv_ogm_packet,
is_single_hop_neigh, is_single_hop_neigh,
......
...@@ -235,7 +235,6 @@ batadv_bla_del_backbone_claims(struct batadv_backbone_gw *backbone_gw) ...@@ -235,7 +235,6 @@ batadv_bla_del_backbone_claims(struct batadv_backbone_gw *backbone_gw)
spin_lock_bh(list_lock); spin_lock_bh(list_lock);
hlist_for_each_entry_safe(claim, node, node_tmp, hlist_for_each_entry_safe(claim, node, node_tmp,
head, hash_entry) { head, hash_entry) {
if (claim->backbone_gw != backbone_gw) if (claim->backbone_gw != backbone_gw)
continue; continue;
...@@ -338,7 +337,6 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac, ...@@ -338,7 +337,6 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac,
"bla_send_claim(): REQUEST of %pM to %pMon vid %d\n", "bla_send_claim(): REQUEST of %pM to %pMon vid %d\n",
ethhdr->h_source, ethhdr->h_dest, vid); ethhdr->h_source, ethhdr->h_dest, vid);
break; break;
} }
if (vid != -1) if (vid != -1)
...@@ -539,7 +537,6 @@ static void batadv_bla_send_announce(struct batadv_priv *bat_priv, ...@@ -539,7 +537,6 @@ static void batadv_bla_send_announce(struct batadv_priv *bat_priv,
batadv_bla_send_claim(bat_priv, mac, backbone_gw->vid, batadv_bla_send_claim(bat_priv, mac, backbone_gw->vid,
BATADV_CLAIM_TYPE_ANNOUNCE); BATADV_CLAIM_TYPE_ANNOUNCE);
} }
/** /**
...@@ -598,7 +595,6 @@ static void batadv_bla_add_claim(struct batadv_priv *bat_priv, ...@@ -598,7 +595,6 @@ static void batadv_bla_add_claim(struct batadv_priv *bat_priv,
claim->backbone_gw->crc ^= crc16(0, claim->addr, ETH_ALEN); claim->backbone_gw->crc ^= crc16(0, claim->addr, ETH_ALEN);
batadv_backbone_gw_free_ref(claim->backbone_gw); batadv_backbone_gw_free_ref(claim->backbone_gw);
} }
/* set (new) backbone gw */ /* set (new) backbone gw */
atomic_inc(&backbone_gw->refcount); atomic_inc(&backbone_gw->refcount);
......
...@@ -164,7 +164,6 @@ static ssize_t batadv_log_read(struct file *file, char __user *buf, ...@@ -164,7 +164,6 @@ static ssize_t batadv_log_read(struct file *file, char __user *buf,
buf++; buf++;
i++; i++;
} }
spin_unlock_bh(&debug_log->lock); spin_unlock_bh(&debug_log->lock);
......
...@@ -184,7 +184,6 @@ void batadv_originator_free(struct batadv_priv *bat_priv) ...@@ -184,7 +184,6 @@ void batadv_originator_free(struct batadv_priv *bat_priv)
spin_lock_bh(list_lock); spin_lock_bh(list_lock);
hlist_for_each_entry_safe(orig_node, node, node_tmp, hlist_for_each_entry_safe(orig_node, node, node_tmp,
head, hash_entry) { head, hash_entry) {
hlist_del_rcu(node); hlist_del_rcu(node);
batadv_orig_node_free_ref(orig_node); batadv_orig_node_free_ref(orig_node);
} }
...@@ -291,7 +290,6 @@ batadv_purge_orig_neighbors(struct batadv_priv *bat_priv, ...@@ -291,7 +290,6 @@ batadv_purge_orig_neighbors(struct batadv_priv *bat_priv,
/* for all neighbors towards this originator ... */ /* for all neighbors towards this originator ... */
hlist_for_each_entry_safe(neigh_node, node, node_tmp, hlist_for_each_entry_safe(neigh_node, node, node_tmp,
&orig_node->neigh_list, list) { &orig_node->neigh_list, list) {
last_seen = neigh_node->last_seen; last_seen = neigh_node->last_seen;
if_incoming = neigh_node->if_incoming; if_incoming = neigh_node->if_incoming;
...@@ -299,7 +297,6 @@ batadv_purge_orig_neighbors(struct batadv_priv *bat_priv, ...@@ -299,7 +297,6 @@ batadv_purge_orig_neighbors(struct batadv_priv *bat_priv,
(if_incoming->if_status == BATADV_IF_INACTIVE) || (if_incoming->if_status == BATADV_IF_INACTIVE) ||
(if_incoming->if_status == BATADV_IF_NOT_IN_USE) || (if_incoming->if_status == BATADV_IF_NOT_IN_USE) ||
(if_incoming->if_status == BATADV_IF_TO_BE_REMOVED)) { (if_incoming->if_status == BATADV_IF_TO_BE_REMOVED)) {
if ((if_incoming->if_status == BATADV_IF_INACTIVE) || if ((if_incoming->if_status == BATADV_IF_INACTIVE) ||
(if_incoming->if_status == BATADV_IF_NOT_IN_USE) || (if_incoming->if_status == BATADV_IF_NOT_IN_USE) ||
(if_incoming->if_status == BATADV_IF_TO_BE_REMOVED)) (if_incoming->if_status == BATADV_IF_TO_BE_REMOVED))
......
...@@ -80,7 +80,6 @@ static void _batadv_update_route(struct batadv_priv *bat_priv, ...@@ -80,7 +80,6 @@ static void _batadv_update_route(struct batadv_priv *bat_priv,
/* route added */ /* route added */
} else if ((!curr_router) && (neigh_node)) { } else if ((!curr_router) && (neigh_node)) {
batadv_dbg(BATADV_DBG_ROUTES, bat_priv, batadv_dbg(BATADV_DBG_ROUTES, bat_priv,
"Adding route towards: %pM (via %pM)\n", "Adding route towards: %pM (via %pM)\n",
orig_node->orig, neigh_node->addr); orig_node->orig, neigh_node->addr);
...@@ -172,7 +171,6 @@ void batadv_bonding_candidate_add(struct batadv_orig_node *orig_node, ...@@ -172,7 +171,6 @@ void batadv_bonding_candidate_add(struct batadv_orig_node *orig_node,
*/ */
hlist_for_each_entry_rcu(tmp_neigh_node, node, hlist_for_each_entry_rcu(tmp_neigh_node, node,
&orig_node->neigh_list, list) { &orig_node->neigh_list, list) {
if (tmp_neigh_node == neigh_node) if (tmp_neigh_node == neigh_node)
continue; continue;
...@@ -836,7 +834,6 @@ static int batadv_route_unicast_packet(struct sk_buff *skb, ...@@ -836,7 +834,6 @@ static int batadv_route_unicast_packet(struct sk_buff *skb,
if (unicast_packet->header.packet_type == BATADV_UNICAST_FRAG && if (unicast_packet->header.packet_type == BATADV_UNICAST_FRAG &&
batadv_frag_can_reassemble(skb, batadv_frag_can_reassemble(skb,
neigh_node->if_incoming->net_dev->mtu)) { neigh_node->if_incoming->net_dev->mtu)) {
ret = batadv_frag_reassemble_skb(skb, bat_priv, &new_skb); ret = batadv_frag_reassemble_skb(skb, bat_priv, &new_skb);
if (ret == NET_RX_DROP) if (ret == NET_RX_DROP)
...@@ -1103,7 +1100,6 @@ int batadv_recv_ucast_frag_packet(struct sk_buff *skb, ...@@ -1103,7 +1100,6 @@ int batadv_recv_ucast_frag_packet(struct sk_buff *skb,
/* packet for me */ /* packet for me */
if (batadv_is_my_mac(unicast_packet->dest)) { if (batadv_is_my_mac(unicast_packet->dest)) {
ret = batadv_frag_reassemble_skb(skb, bat_priv, &new_skb); ret = batadv_frag_reassemble_skb(skb, bat_priv, &new_skb);
if (ret == NET_RX_DROP) if (ret == NET_RX_DROP)
......
...@@ -330,7 +330,6 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv, ...@@ -330,7 +330,6 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
spin_lock_bh(&bat_priv->forw_bcast_list_lock); spin_lock_bh(&bat_priv->forw_bcast_list_lock);
hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node, hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node,
&bat_priv->forw_bcast_list, list) { &bat_priv->forw_bcast_list, list) {
/* if purge_outstanding_packets() was called with an argument /* if purge_outstanding_packets() was called with an argument
* we delete only packets belonging to the given interface * we delete only packets belonging to the given interface
*/ */
...@@ -357,7 +356,6 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv, ...@@ -357,7 +356,6 @@ batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
spin_lock_bh(&bat_priv->forw_bat_list_lock); spin_lock_bh(&bat_priv->forw_bat_list_lock);
hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node, hlist_for_each_entry_safe(forw_packet, tmp_node, safe_tmp_node,
&bat_priv->forw_bat_list, list) { &bat_priv->forw_bat_list, list) {
/* if purge_outstanding_packets() was called with an argument /* if purge_outstanding_packets() was called with an argument
* we delete only packets belonging to the given interface * we delete only packets belonging to the given interface
*/ */
......
...@@ -116,7 +116,6 @@ batadv_tt_global_hash_find(struct batadv_priv *bat_priv, const void *data) ...@@ -116,7 +116,6 @@ batadv_tt_global_hash_find(struct batadv_priv *bat_priv, const void *data)
struct batadv_tt_global_entry, struct batadv_tt_global_entry,
common); common);
return tt_global_entry; return tt_global_entry;
} }
static void static void
...@@ -256,7 +255,6 @@ static void batadv_tt_global_free(struct batadv_priv *bat_priv, ...@@ -256,7 +255,6 @@ static void batadv_tt_global_free(struct batadv_priv *bat_priv,
batadv_hash_remove(bat_priv->tt.global_hash, batadv_compare_tt, batadv_hash_remove(bat_priv->tt.global_hash, batadv_compare_tt,
batadv_choose_orig, tt_global->common.addr); batadv_choose_orig, tt_global->common.addr);
batadv_tt_global_entry_free_ref(tt_global); batadv_tt_global_entry_free_ref(tt_global);
} }
void batadv_tt_local_add(struct net_device *soft_iface, const uint8_t *addr, void batadv_tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
...@@ -652,7 +650,6 @@ static void batadv_tt_local_purge(struct batadv_priv *bat_priv) ...@@ -652,7 +650,6 @@ static void batadv_tt_local_purge(struct batadv_priv *bat_priv)
batadv_tt_local_purge_list(bat_priv, head); batadv_tt_local_purge_list(bat_priv, head);
spin_unlock_bh(list_lock); spin_unlock_bh(list_lock);
} }
} }
static void batadv_tt_local_table_free(struct batadv_priv *bat_priv) static void batadv_tt_local_table_free(struct batadv_priv *bat_priv)
...@@ -1079,7 +1076,6 @@ batadv_tt_global_del_orig_list(struct batadv_tt_global_entry *tt_global_entry) ...@@ -1079,7 +1076,6 @@ batadv_tt_global_del_orig_list(struct batadv_tt_global_entry *tt_global_entry)
batadv_tt_orig_list_entry_free_ref(orig_entry); batadv_tt_orig_list_entry_free_ref(orig_entry);
} }
spin_unlock_bh(&tt_global_entry->list_lock); spin_unlock_bh(&tt_global_entry->list_lock);
} }
static void static void
...@@ -1855,7 +1851,6 @@ batadv_send_other_tt_response(struct batadv_priv *bat_priv, ...@@ -1855,7 +1851,6 @@ batadv_send_other_tt_response(struct batadv_priv *bat_priv,
if (!ret) if (!ret)
kfree_skb(skb); kfree_skb(skb);
return ret; return ret;
} }
static bool static bool
...@@ -2382,7 +2377,6 @@ static void batadv_tt_local_purge_pending_clients(struct batadv_priv *bat_priv) ...@@ -2382,7 +2377,6 @@ static void batadv_tt_local_purge_pending_clients(struct batadv_priv *bat_priv)
} }
spin_unlock_bh(list_lock); spin_unlock_bh(list_lock);
} }
} }
static int batadv_tt_commit_changes(struct batadv_priv *bat_priv, static int batadv_tt_commit_changes(struct batadv_priv *bat_priv,
...@@ -2579,7 +2573,6 @@ bool batadv_tt_local_client_is_roaming(struct batadv_priv *bat_priv, ...@@ -2579,7 +2573,6 @@ bool batadv_tt_local_client_is_roaming(struct batadv_priv *bat_priv,
batadv_tt_local_entry_free_ref(tt_local_entry); batadv_tt_local_entry_free_ref(tt_local_entry);
out: out:
return ret; return ret;
} }
bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv, bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv,
......
...@@ -133,7 +133,6 @@ batadv_frag_search_packet(struct list_head *head, ...@@ -133,7 +133,6 @@ batadv_frag_search_packet(struct list_head *head,
is_head = !!(up->flags & BATADV_UNI_FRAG_HEAD); is_head = !!(up->flags & BATADV_UNI_FRAG_HEAD);
list_for_each_entry(tfp, head, list) { list_for_each_entry(tfp, head, list) {
if (!tfp->skb) if (!tfp->skb)
continue; continue;
...@@ -162,7 +161,6 @@ void batadv_frag_list_free(struct list_head *head) ...@@ -162,7 +161,6 @@ void batadv_frag_list_free(struct list_head *head)
struct batadv_frag_packet_list_entry *pf, *tmp_pf; struct batadv_frag_packet_list_entry *pf, *tmp_pf;
if (!list_empty(head)) { if (!list_empty(head)) {
list_for_each_entry_safe(pf, tmp_pf, head, list) { list_for_each_entry_safe(pf, tmp_pf, head, list) {
kfree_skb(pf->skb); kfree_skb(pf->skb);
list_del(&pf->list); list_del(&pf->list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment