From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
"Maciej W. Rozycki" <macro@orcam.me.uk>
Subject: [PATCH net-next 10/11] fddi: use eth_hw_addr_set()
Date: Fri, 1 Oct 2021 14:32:27 -0700 [thread overview]
Message-ID: <20211001213228.1735079-11-kuba@kernel.org> (raw)
In-Reply-To: <20211001213228.1735079-1-kuba@kernel.org>
Convert from memcpy(), include is needed.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--
CC: "Maciej W. Rozycki" <macro@orcam.me.uk>
---
drivers/net/fddi/skfp/skfddi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fddi/skfp/skfddi.c b/drivers/net/fddi/skfp/skfddi.c
index cc5126ea7ef5..652cb174302e 100644
--- a/drivers/net/fddi/skfp/skfddi.c
+++ b/drivers/net/fddi/skfp/skfddi.c
@@ -78,6 +78,7 @@ static const char * const boot_msg =
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
#include <linux/fddidevice.h>
#include <linux/skbuff.h>
#include <linux/bitops.h>
@@ -433,7 +434,7 @@ static int skfp_driver_init(struct net_device *dev)
}
read_address(smc, NULL);
pr_debug("HW-Addr: %pMF\n", smc->hw.fddi_canon_addr.a);
- memcpy(dev->dev_addr, smc->hw.fddi_canon_addr.a, ETH_ALEN);
+ eth_hw_addr_set(dev, smc->hw.fddi_canon_addr.a);
smt_reset_defaults(smc, 0);
@@ -500,7 +501,7 @@ static int skfp_open(struct net_device *dev)
* address.
*/
read_address(smc, NULL);
- memcpy(dev->dev_addr, smc->hw.fddi_canon_addr.a, ETH_ALEN);
+ eth_hw_addr_set(dev, smc->hw.fddi_canon_addr.a);
init_smt(smc, NULL);
smt_online(smc, 1);
--
2.31.1
next prev parent reply other threads:[~2021-10-01 21:33 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 ` [PATCH net-next 01/11] arch: use eth_hw_addr_set() Jakub Kicinski
2021-10-01 22:59 ` 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 ` Jakub Kicinski [this message]
2021-10-18 2:34 ` [PATCH net-next 10/11] fddi: " 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-11-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=macro@orcam.me.uk \
--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).