From patchwork Fri Apr 19 10:06:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 2912 Return-Path: Received: from mout.web.de (mout.web.de [212.227.15.3]) by open-mesh.org (Postfix) with ESMTP id 942AC6006E7 for ; Fri, 19 Apr 2013 12:06:59 +0200 (CEST) Received: from localhost ([130.225.247.81]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0LrJxk-1UfTaA1Ami-013XOb; Fri, 19 Apr 2013 12:06:58 +0200 From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 19 Apr 2013 12:06:56 +0200 Message-Id: <1366366016-7691-1-git-send-email-linus.luessing@web.de> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-Provags-ID: V02:K0:6cLv0CEDwxXpWh87k3JymKy9GUU9oMW0/W+Utg4U0yS GuumzuO9/8E8wjaO+HE9xZ6tsQpogSoTV7uAvOm2QGDgvXI0iO zKD6f79iCUHtKpS6Ginpr78Cc659C/8tcJRk9bPZKubu81VKIz zeXmn7zCP/7UbTsPORnhXRJRfADdxfZTRo0cC8hnUxHNrqeXxc NrEc7JW/5UDYmy//92yCg== Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Remove unnecessary INIT_HLIST_NODE() calls X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2013 10:06:59 -0000 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 --- 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(-) diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c index 5b0a043..d07323b 100644 --- a/bat_iv_ogm.c +++ b/bat_iv_ogm.c @@ -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); diff --git a/send.c b/send.c index ed7072a..ce69f45 100644 --- a/send.c +++ b/send.c @@ -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);