From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-m68k@lists.linux-m68k.org, Chris Zankel <chris@zankel.net>,
Max Filippov <jcmvbkbc@gmail.com>,
linux-xtensa@linux-xtensa.org
Subject: [PATCH net-next 01/11] arch: use eth_hw_addr_set()
Date: Fri, 1 Oct 2021 14:32:18 -0700 [thread overview]
Message-ID: <20211001213228.1735079-2-kuba@kernel.org> (raw)
In-Reply-To: <20211001213228.1735079-1-kuba@kernel.org>
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.
Convert misc arch drivers from memcpy(... ETH_ADDR) to eth_hw_addr_set():
@@
expression dev, np;
@@
- memcpy(dev->dev_addr, np, ETH_ALEN)
+ eth_hw_addr_set(dev, np)
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--
CC: Geert Uytterhoeven <geert@linux-m68k.org>
CC: linux-m68k@lists.linux-m68k.org
CC: Chris Zankel <chris@zankel.net>
CC: Max Filippov <jcmvbkbc@gmail.com>
CC: linux-xtensa@linux-xtensa.org
---
arch/m68k/emu/nfeth.c | 2 +-
arch/xtensa/platforms/iss/network.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c
index 79e55421cfb1..1a5d1e8eb4c8 100644
--- a/arch/m68k/emu/nfeth.c
+++ b/arch/m68k/emu/nfeth.c
@@ -200,7 +200,7 @@ static struct net_device * __init nfeth_probe(int unit)
dev->irq = nfEtherIRQ;
dev->netdev_ops = &nfeth_netdev_ops;
- memcpy(dev->dev_addr, mac, ETH_ALEN);
+ eth_hw_addr_set(dev, mac);
priv = netdev_priv(dev);
priv->ethX = unit;
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c
index 4986226a5ab2..8b806d305948 100644
--- a/arch/xtensa/platforms/iss/network.c
+++ b/arch/xtensa/platforms/iss/network.c
@@ -467,7 +467,7 @@ static int iss_net_set_mac(struct net_device *dev, void *addr)
if (!is_valid_ether_addr(hwaddr->sa_data))
return -EADDRNOTAVAIL;
spin_lock_bh(&lp->lock);
- memcpy(dev->dev_addr, hwaddr->sa_data, ETH_ALEN);
+ eth_hw_addr_set(dev, hwaddr->sa_data);
spin_unlock_bh(&lp->lock);
return 0;
}
--
2.31.1
next prev parent reply other threads:[~2021-10-01 21:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 21:32 [PATCH net-next 00/11] Use netdev->dev_addr write helpers (part 1) Jakub Kicinski
2021-10-01 21:32 ` Jakub Kicinski [this message]
2021-10-01 22:59 ` [PATCH net-next 01/11] arch: use eth_hw_addr_set() Max Filippov
2021-10-02 9:19 ` Geert Uytterhoeven
2021-10-01 21:32 ` [PATCH net-next 02/11] net: " Jakub Kicinski
2021-10-01 21:32 ` [PATCH net-next 03/11] ethernet: " Jakub Kicinski
2021-10-02 16:32 ` Ido Schimmel
2021-10-03 0:12 ` Jakub Kicinski
2021-10-03 4:40 ` Ido Schimmel
2021-10-01 21:32 ` [PATCH net-next 04/11] net: usb: " Jakub Kicinski
2021-10-01 21:32 ` [PATCH net-next 05/11] net: use eth_hw_addr_set() instead of ether_addr_copy() Jakub Kicinski
2021-10-01 21:32 ` [PATCH net-next 06/11] ethernet: " Jakub Kicinski
2021-10-01 21:32 ` [PATCH net-next 07/11] net: usb: " Jakub Kicinski
2021-10-01 21:32 ` [PATCH net-next 08/11] ethernet: chelsio: use eth_hw_addr_set() Jakub Kicinski
2021-10-01 21:32 ` [PATCH net-next 09/11] ethernet: s2io: " Jakub Kicinski
2021-10-01 21:32 ` [PATCH net-next 10/11] fddi: " Jakub Kicinski
2021-10-18 2:34 ` Maciej W. Rozycki
2021-10-01 21:32 ` [PATCH net-next 11/11] ethernet: use eth_hw_addr_set() - casts Jakub Kicinski
2021-10-02 15:10 ` [PATCH net-next 00/11] Use netdev->dev_addr write helpers (part 1) 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=20211001213228.1735079-2-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=chris@zankel.net \
--cc=davem@davemloft.net \
--cc=geert@linux-m68k.org \
--cc=jcmvbkbc@gmail.com \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-xtensa@linux-xtensa.org \
--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).