[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240919085746.16904-1-tklauser@distanz.ch>
Date: Thu, 19 Sep 2024 10:57:46 +0200
From: Tobias Klauser <tklauser@...tanz.ch>
To: wireguard@...ts.zx2c4.com,
netdev@...r.kernel.org
Cc: "Jason A. Donenfeld" <Jason@...c4.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH net-next] wireguard: Omit unnecessary memset of netdev private data
The memory for netdev_priv is allocated using kvzalloc in
alloc_netdev_mqs before rtnl_link_ops->setup is called so there is no
need to zero it again in wg_setup.
Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
---
drivers/net/wireguard/device.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireguard/device.c b/drivers/net/wireguard/device.c
index 45e9b908dbfb..a2ba71fbbed4 100644
--- a/drivers/net/wireguard/device.c
+++ b/drivers/net/wireguard/device.c
@@ -302,7 +302,6 @@ static void wg_setup(struct net_device *dev)
/* We need to keep the dst around in case of icmp replies. */
netif_keep_dst(dev);
- memset(wg, 0, sizeof(*wg));
wg->dev = dev;
}
--
2.43.0
Powered by blists - more mailing lists