Repository : ssh://git@open-mesh.org/batman-adv
On branches: ecsv/pu,master
commit 9210dca17a0acc2d01928893a61647153d578e33 Author: Tobias Klauser tklauser@distanz.ch Date: Fri Mar 17 12:08:59 2017 +0100
batman-adv: Omit unnecessary memset of netdev private data
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 tklauser@distanz.ch Signed-off-by: Sven Eckelmann sven@narfation.org
9210dca17a0acc2d01928893a61647153d578e33 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 d042c99..4dd7840 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -971,8 +971,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; @@ -989,8 +987,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)