From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, dave@thedillows.org,
linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net v2 5/6] ethernet: 8390/etherh: don't write directly to netdev->dev_addr
Date: Tue, 25 Jan 2022 16:38:00 -0800 [thread overview]
Message-ID: <20220126003801.1736586-6-kuba@kernel.org> (raw)
In-Reply-To: <20220126003801.1736586-1-kuba@kernel.org>
netdev->dev_addr is const now.
Compile tested rpc_defconfig w/ GCC 8.5.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/8390/etherh.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/8390/etherh.c b/drivers/net/ethernet/8390/etherh.c
index bd22a534b1c0..e7b879123bb1 100644
--- a/drivers/net/ethernet/8390/etherh.c
+++ b/drivers/net/ethernet/8390/etherh.c
@@ -655,6 +655,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
struct ei_device *ei_local;
struct net_device *dev;
struct etherh_priv *eh;
+ u8 addr[ETH_ALEN];
int ret;
ret = ecard_request_resources(ec);
@@ -724,12 +725,13 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
spin_lock_init(&ei_local->page_lock);
if (ec->cid.product == PROD_ANT_ETHERM) {
- etherm_addr(dev->dev_addr);
+ etherm_addr(addr);
ei_local->reg_offset = etherm_regoffsets;
} else {
- etherh_addr(dev->dev_addr, ec);
+ etherh_addr(addr, ec);
ei_local->reg_offset = etherh_regoffsets;
}
+ eth_hw_addr_set(dev, addr);
ei_local->name = dev->name;
ei_local->word16 = 1;
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-01-26 0:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 0:37 [PATCH net v2 0/6] ethernet: fix some esoteric drivers after netdev->dev_addr constification Jakub Kicinski
2022-01-26 0:37 ` [PATCH net v2 1/6] ethernet: 3com/typhoon: don't write directly to netdev->dev_addr Jakub Kicinski
2022-01-26 0:37 ` [PATCH net v2 2/6] ethernet: tundra: " Jakub Kicinski
2022-01-26 0:37 ` [PATCH net v2 3/6] ethernet: broadcom/sb1250-mac: " Jakub Kicinski
2022-01-26 0:37 ` [PATCH net v2 4/6] ethernet: i825xx: " Jakub Kicinski
2022-01-26 11:00 ` Russell King (Oracle)
2022-01-26 0:38 ` Jakub Kicinski [this message]
2022-01-26 11:01 ` [PATCH net v2 5/6] ethernet: 8390/etherh: " Russell King (Oracle)
2022-01-26 0:38 ` [PATCH net v2 6/6] ethernet: seeq/ether3: " Jakub Kicinski
2022-01-26 11:01 ` Russell King (Oracle)
2022-01-26 15:50 ` [PATCH net v2 0/6] ethernet: fix some esoteric drivers after netdev->dev_addr constification 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=20220126003801.1736586-6-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=dave@thedillows.org \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@armlinux.org.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).