Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e54c77f0 authored by Linus Lüssing's avatar Linus Lüssing Committed by Antonio Quartulli
Browse files

batman-adv: Remove unnecessary INIT_HLIST_NODE() calls



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: default avatarLinus Lüssing <linus.luessing@web.de>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
Signed-off-by: default avatarAntonio Quartulli <ordex@autistici.org>
parent d4ff40f6
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -464,8 +464,6 @@ static void batadv_iv_ogm_aggregate_new(const unsigned char *packet_buff,
	}
	}
	skb_reserve(forw_packet_aggr->skb, ETH_HLEN);
	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);
	skb_buff = skb_put(forw_packet_aggr->skb, packet_len);
	forw_packet_aggr->packet_len = packet_len;
	forw_packet_aggr->packet_len = packet_len;
	memcpy(skb_buff, packet_buff, packet_len);
	memcpy(skb_buff, packet_buff, packet_len);
+0 −2
Original line number Original line Diff line number Diff line
@@ -152,8 +152,6 @@ _batadv_add_bcast_packet_to_list(struct batadv_priv *bat_priv,
				 struct batadv_forw_packet *forw_packet,
				 struct batadv_forw_packet *forw_packet,
				 unsigned long send_time)
				 unsigned long send_time)
{
{
	INIT_HLIST_NODE(&forw_packet->list);

	/* add new packet to packet list */
	/* add new packet to packet list */
	spin_lock_bh(&bat_priv->forw_bcast_list_lock);
	spin_lock_bh(&bat_priv->forw_bcast_list_lock);
	hlist_add_head(&forw_packet->list, &bat_priv->forw_bcast_list);
	hlist_add_head(&forw_packet->list, &bat_priv->forw_bcast_list);