* [PATCH] batman-adv: Omit unnecessary memset of netdev private data
@ 2017-03-17 11:08 Tobias Klauser
2017-03-17 11:54 ` [B.A.T.M.A.N.] " Sven Eckelmann
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2017-03-17 11:08 UTC (permalink / raw)
To: Marek Lindner, Simon Wunderlich, Antonio Quartulli
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r, David S. Miller
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-93Khv+1bN0NyDzI6CaY1VQ@public.gmane.org>
---
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)
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Omit unnecessary memset of netdev private data
2017-03-17 11:08 [PATCH] batman-adv: Omit unnecessary memset of netdev private data Tobias Klauser
@ 2017-03-17 11:54 ` Sven Eckelmann
0 siblings, 0 replies; 2+ messages in thread
From: Sven Eckelmann @ 2017-03-17 11:54 UTC (permalink / raw)
To: b.a.t.m.a.n
Cc: Tobias Klauser, Marek Lindner, Simon Wunderlich,
Antonio Quartulli, netdev, David S. Miller
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
On Freitag, 17. März 2017 12:08:59 CET Tobias Klauser wrote:
> 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>
> ---
> net/batman-adv/soft-interface.c | 4 ----
> 1 file changed, 4 deletions(-)
Thanks, applied in 9210dca17a0acc2d01928893a61647153d578e33 [1].
Kind regards,
Sven
[1] https://git.open-mesh.org/batman-adv.git/commit/9210dca17a0acc2d01928893a61647153d578e33
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-17 11:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-17 11:08 [PATCH] batman-adv: Omit unnecessary memset of netdev private data Tobias Klauser
2017-03-17 11:54 ` [B.A.T.M.A.N.] " Sven Eckelmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).