[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241117212030.629159-2-Jason@zx2c4.com>
Date: Sun, 17 Nov 2024 22:20:27 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: netdev@...r.kernel.org,
kuba@...nel.org,
pabeni@...hat.com
Cc: Tobias Klauser <tklauser@...tanz.ch>,
Simon Horman <horms@...nel.org>,
"Jason A. Donenfeld" <Jason@...c4.com>
Subject: [PATCH net-next 1/4] wireguard: device: omit unnecessary memset of netdev private data
From: Tobias Klauser <tklauser@...tanz.ch>
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>
Reviewed-by: Simon Horman <horms@...nel.org>
Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
---
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.46.0
Powered by blists - more mailing lists