From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com
Cc: Tobias Klauser <tklauser@distanz.ch>,
Simon Horman <horms@kernel.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH net-next 1/4] wireguard: device: omit unnecessary memset of netdev private data
Date: Sun, 17 Nov 2024 22:20:27 +0100 [thread overview]
Message-ID: <20241117212030.629159-2-Jason@zx2c4.com> (raw)
In-Reply-To: <20241117212030.629159-1-Jason@zx2c4.com>
From: Tobias Klauser <tklauser@distanz.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@distanz.ch>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.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
next prev parent reply other threads:[~2024-11-17 21:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 21:20 [PATCH net-next 0/4] wireguard updates and fixes for 6.13 Jason A. Donenfeld
2024-11-17 21:20 ` Jason A. Donenfeld [this message]
2024-11-17 21:20 ` [PATCH net-next 2/4] wireguard: allowedips: remove redundant selftest call Jason A. Donenfeld
2024-11-17 21:20 ` [PATCH net-next 3/4] wireguard: selftests: load nf_conntrack if not present Jason A. Donenfeld
2024-11-17 21:20 ` [PATCH net-next 4/4] wireguard: device: support big tcp GSO Jason A. Donenfeld
2024-11-19 4:00 ` [PATCH net-next 0/4] wireguard updates and fixes for 6.13 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241117212030.629159-2-Jason@zx2c4.com \
--to=jason@zx2c4.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tklauser@distanz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.