|
Kmods SIG |
6dd491 |
From 18755e270666ce869289bceb734d25eae2be9da9 Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
6dd491 |
From: Krzysztof Halasa <khalasa@piap.pl>
|
|
Kmods SIG |
6dd491 |
Date: Thu, 18 Feb 2021 13:34:42 +0100
|
|
Kmods SIG |
6dd491 |
Subject: [Backport 18755e270666] Marvell Sky2 Ethernet adapter: fix warning
|
|
Kmods SIG |
6dd491 |
messages.
|
|
Kmods SIG |
6dd491 |
|
|
Kmods SIG |
6dd491 |
sky2.c driver uses netdev_warn() before the net device is initialized.
|
|
Kmods SIG |
6dd491 |
Fix it by using dev_warn() instead.
|
|
Kmods SIG |
6dd491 |
|
|
Kmods SIG |
6dd491 |
Signed-off-by: Krzysztof Halasa <khalasa@piap.pl>
|
|
Kmods SIG |
6dd491 |
|
|
Kmods SIG |
6dd491 |
Link: https://lore.kernel.org/r/m3a6s1r1ul.fsf@t19.piap.pl
|
|
Kmods SIG |
6dd491 |
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
Kmods SIG |
6dd491 |
---
|
|
Kmods SIG |
6dd491 |
src/sky2.c | 5 ++---
|
|
Kmods SIG |
6dd491 |
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
Kmods SIG |
6dd491 |
|
|
Kmods SIG |
6dd491 |
diff --git a/src/sky2.c b/src/sky2.c
|
|
Kmods SIG |
6dd491 |
index ebe1406c6e64821f26e9f025d9ce8f01b0f74c42..dbec8e187a6821558b5bf8373364eeb3487bf06d 100644
|
|
Kmods SIG |
6dd491 |
--- a/src/sky2.c
|
|
Kmods SIG |
6dd491 |
+++ b/src/sky2.c
|
|
Kmods SIG |
6dd491 |
@@ -4806,12 +4806,11 @@ static struct net_device *sky2_init_netdev(struct sky2_hw *hw, unsigned port,
|
|
Kmods SIG |
6dd491 |
if (!is_valid_ether_addr(dev->dev_addr)) {
|
|
Kmods SIG |
6dd491 |
struct sockaddr sa = { AF_UNSPEC };
|
|
Kmods SIG |
6dd491 |
|
|
Kmods SIG |
6dd491 |
- netdev_warn(dev,
|
|
Kmods SIG |
6dd491 |
- "Invalid MAC address, defaulting to random\n");
|
|
Kmods SIG |
6dd491 |
+ dev_warn(&hw->pdev->dev, "Invalid MAC address, defaulting to random\n");
|
|
Kmods SIG |
6dd491 |
eth_hw_addr_random(dev);
|
|
Kmods SIG |
6dd491 |
memcpy(sa.sa_data, dev->dev_addr, ETH_ALEN);
|
|
Kmods SIG |
6dd491 |
if (sky2_set_mac_address(dev, &sa))
|
|
Kmods SIG |
6dd491 |
- netdev_warn(dev, "Failed to set MAC address.\n");
|
|
Kmods SIG |
6dd491 |
+ dev_warn(&hw->pdev->dev, "Failed to set MAC address.\n");
|
|
Kmods SIG |
6dd491 |
}
|
|
Kmods SIG |
6dd491 |
|
|
Kmods SIG |
6dd491 |
return dev;
|
|
Kmods SIG |
6dd491 |
--
|
|
Kmods SIG |
6dd491 |
2.31.1
|
|
Kmods SIG |
6dd491 |
|