netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next v2 1/8] net: core: constify mac addrs in selftests
Date: Fri, 22 Oct 2021 16:20:56 -0700	[thread overview]
Message-ID: <20211022232103.2715312-2-kuba@kernel.org> (raw)
In-Reply-To: <20211022232103.2715312-1-kuba@kernel.org>

Get it ready for constant netdev->dev_addr.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 net/core/selftests.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/core/selftests.c b/net/core/selftests.c
index 9077fa969892..acb1ee97bbd3 100644
--- a/net/core/selftests.c
+++ b/net/core/selftests.c
@@ -15,8 +15,8 @@
 #include <net/udp.h>
 
 struct net_packet_attrs {
-	unsigned char *src;
-	unsigned char *dst;
+	const unsigned char *src;
+	const unsigned char *dst;
 	u32 ip_src;
 	u32 ip_dst;
 	bool tcp;
@@ -173,8 +173,8 @@ static int net_test_loopback_validate(struct sk_buff *skb,
 				      struct net_device *orig_ndev)
 {
 	struct net_test_priv *tpriv = pt->af_packet_priv;
-	unsigned char *src = tpriv->packet->src;
-	unsigned char *dst = tpriv->packet->dst;
+	const unsigned char *src = tpriv->packet->src;
+	const unsigned char *dst = tpriv->packet->dst;
 	struct netsfhdr *shdr;
 	struct ethhdr *ehdr;
 	struct udphdr *uhdr;
-- 
2.31.1


  reply	other threads:[~2021-10-22 23:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 23:20 [PATCH net-next v2 0/8] don't write directly to netdev->dev_addr Jakub Kicinski
2021-10-22 23:20 ` Jakub Kicinski [this message]
2021-10-22 23:20 ` [PATCH net-next v2 2/8] net: rtnetlink: use __dev_addr_set() Jakub Kicinski
2021-10-22 23:20 ` [PATCH net-next v2 3/8] net: phy: constify netdev->dev_addr references Jakub Kicinski
2021-10-22 23:20 ` [PATCH net-next v2 4/8] net: bonding: constify and use dev_addr_set() Jakub Kicinski
2021-10-22 23:21 ` [PATCH net-next v2 5/8] net: hsr: get ready for const netdev->dev_addr Jakub Kicinski
2021-10-22 23:21 ` [PATCH net-next v2 6/8] net: caif: " Jakub Kicinski
2021-10-22 23:21 ` [PATCH net-next v2 7/8] net: drivers: " Jakub Kicinski
2021-10-22 23:21 ` [PATCH net-next v2 8/8] net: atm: use address setting helpers Jakub Kicinski
2021-10-25 12:10 ` [PATCH net-next v2 0/8] don't write directly to netdev->dev_addr 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=20211022232103.2715312-2-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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 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).