batman-adv: Remove unnecessary INIT_HLIST_NODE() calls
PATCH 1/1 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 Linus Lüssing <[email protected]>
---
Unmodified, reposted from: https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2013-March/009248.html
bat_iv_ogm.c | 2 -- send.c | 2 -- 2 files changed, 4 deletions(-)
bat_iv_ogm.c +0 -2
@@ -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);
send.c +0 -2
@@ -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);
Signature · 1 line
1.7.10.4
Marek Lindner
AppliedQuoted 4 lines · On Friday, April 19, 2013 18:06:56 Linus Lüssing wrote:
There's no need to for an explicit
hlist_nodeinitialization if it is added to a list right away, like it's the case with the hlist_add_head()s here.
Quoted 8 lines
Signed-off-by Linus Lüssing <[email protected]>---
Unmodified, reposted from:
https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2013-March/009248.htmlbat_iv_ogm.c | 2 -- send.c | 2 -- 2 files changed, 4 deletions(-)
Applied in revision 68a3373.
Thanks,
Marek