batman-adv: Remove unnecessary INIT_HLIST_NODE() calls
authorLinus Lüssing <linus.luessing@web.de>
Fri, 19 Apr 2013 10:06:56 +0000 (12:06 +0200)
committerAntonio Quartulli <ordex@autistici.org>
Wed, 29 May 2013 00:44:55 +0000 (02:44 +0200)
There's no need to for an explicit hlist_node initialization if it is
added to a list right away, like it's the case with the
hlist_add_head()s here.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/bat_iv_ogm.c
net/batman-adv/send.c

index 5b0a043c47c857dfa22c8f54a6a042433be9d03d..d07323b3e9b8e611e99f44b116934c1bf750a79e 100644 (file)
@@ -464,8 +464,6 @@ static void batadv_iv_ogm_aggregate_new(const unsigned char *packet_buff,
        }
        skb_reserve(forw_packet_aggr->skb, ETH_HLEN);
 
-       INIT_HLIST_NODE(&forw_packet_aggr->list);
-
        skb_buff = skb_put(forw_packet_aggr->skb, packet_len);
        forw_packet_aggr->packet_len = packet_len;
        memcpy(skb_buff, packet_buff, packet_len);
index ed7072ad84e8acd46ccd511242b21411195c627d..ce69f458a75480789cb40e8086ca515881137468 100644 (file)
@@ -152,8 +152,6 @@ _batadv_add_bcast_packet_to_list(struct batadv_priv *bat_priv,
                                 struct batadv_forw_packet *forw_packet,
                                 unsigned long send_time)
 {
-       INIT_HLIST_NODE(&forw_packet->list);
-
        /* add new packet to packet list */
        spin_lock_bh(&bat_priv->forw_bcast_list_lock);
        hlist_add_head(&forw_packet->list, &bat_priv->forw_bcast_list);