On 2014-03-17 06:22, Antonio Quartulli wrote: > - keep variable declarations in ascendant line length order > - use common iteration style pattern when looking up an > object
Do you mean descending line length?
// Martin
> Introduced by 86cb16e5ec1e2d75821006e8f4abbec66fb741ac
> ("batman-adv: Add IPv4 link-local/IPv6-ll-all-nodes multicast support")
>
> Cc: Linux Lüssing <[email protected]>
> Signed-off-by: Antonio Quartulli <[email protected]>
> ---
> multicast.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/multicast.c b/multicast.c
> index 5a39fc1..166d0a3 100644
> --- a/multicast.c
> +++ b/multicast.c
> @@ -493,20 +493,20 @@ batadv_mcast_forw_ip_node_get(struct batadv_priv
> *bat_priv,
> static struct batadv_orig_node *
> batadv_mcast_forw_unsnoop_node_get(struct batadv_priv *bat_priv)
> {
> - struct batadv_orig_node *orig_node;
> + struct batadv_orig_node *tmp_orig_node, *orig_node = NULL;
>
> rcu_read_lock();
> - hlist_for_each_entry_rcu(orig_node,
> + hlist_for_each_entry_rcu(tmp_orig_node,
> &bat_priv->mcast.want_all_unsnoopables_list,
> mcast_want_all_unsnoopables_node) {
> - if (atomic_inc_not_zero(&orig_node->refcount))
> - goto unlock;
> - }
> -
> - orig_node = NULL;
> + if (!atomic_inc_not_zero(&orig_node->refcount))
> + continue;
>
> -unlock:
> + orig_node = tmp_orig_node;
> + break;
> + }
> rcu_read_unlock();
> +
> return orig_node;
> }
>
> @@ -524,9 +524,9 @@ enum batadv_forw_mode
> batadv_mcast_forw_mode(struct batadv_priv *bat_priv, struct sk_buff *skb,
> struct batadv_orig_node **orig)
> {
> - struct ethhdr *ethhdr;
> - bool is_unsnoopable = false;
> int ret, tt_count, ip_count, unsnoop_count, total_count;
> + bool is_unsnoopable = false;
> + struct ethhdr *ethhdr;
>
> ret = batadv_mcast_forw_mode_check(bat_priv, skb, &is_unsnoopable);
> if (ret == -ENOMEM)
>
--
Kind Regards
Martin Hundebøll
Frederiks Allé 99, 1.th
8000 Aarhus C
Denmark
+45 61 65 54 61
[email protected]
signature.asc
Description: OpenPGP digital signature
