From patchwork Fri Mar 17 11:08:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Klauser X-Patchwork-Id: 16981 Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 8076283641; Fri, 17 Mar 2017 12:15:10 +0100 (CET) Authentication-Results: open-mesh.org; dmarc=none header.from=distanz.ch Received-SPF: None (no SPF record) identity=mailfrom; client-ip=212.126.164.98; helo=mail.zhinst.com; envelope-from=tklauser@distanz.ch; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=distanz.ch X-Greylist: delayed 368 seconds by postgrey-1.35 at open-mesh.org; Fri, 17 Mar 2017 12:15:09 CET Received: from mail.zhinst.com (mail.zhinst.com [212.126.164.98]) by open-mesh.org (Postfix) with ESMTP id 08D038363F for ; Fri, 17 Mar 2017 12:15:08 +0100 (CET) Received: from ziws08.zhinst.com ([10.42.0.7]) by mail.zhinst.com (Kerio Connect 9.2.1) with ESMTP; Fri, 17 Mar 2017 12:08:59 +0100 From: Tobias Klauser To: Marek Lindner , Simon Wunderlich , Antonio Quartulli Date: Fri, 17 Mar 2017 12:08:59 +0100 Message-Id: <20170317110859.9273-1-tklauser@distanz.ch> X-Mailer: git-send-email 2.11.0 Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, "David S. Miller" Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Omit unnecessary memset of netdev private data X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The memory for netdev_priv is allocated using kzalloc in alloc_netdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser --- net/batman-adv/soft-interface.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 5d099b2e6cfc..8226495c6664 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -972,8 +972,6 @@ static void batadv_softif_free(struct net_device *dev) */ static void batadv_softif_init_early(struct net_device *dev) { - struct batadv_priv *priv = netdev_priv(dev); - ether_setup(dev); dev->netdev_ops = &batadv_netdev_ops; @@ -990,8 +988,6 @@ static void batadv_softif_init_early(struct net_device *dev) eth_hw_addr_random(dev); dev->ethtool_ops = &batadv_ethtool_ops; - - memset(priv, 0, sizeof(*priv)); } struct net_device *batadv_softif_create(struct net *net, const char *name)