Commit 18755e27 authored by Krzysztof Halasa's avatar Krzysztof Halasa Committed by Jakub Kicinski

Marvell Sky2 Ethernet adapter: fix warning messages.

sky2.c driver uses netdev_warn() before the net device is initialized.
Fix it by using dev_warn() instead.
Signed-off-by: default avatarKrzysztof Halasa <khalasa@piap.pl>

Link: https://lore.kernel.org/r/m3a6s1r1ul.fsf@t19.piap.plSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 9bc1ef64
......@@ -4806,12 +4806,11 @@ static struct net_device *sky2_init_netdev(struct sky2_hw *hw, unsigned port,
if (!is_valid_ether_addr(dev->dev_addr)) {
struct sockaddr sa = { AF_UNSPEC };
netdev_warn(dev,
"Invalid MAC address, defaulting to random\n");
dev_warn(&hw->pdev->dev, "Invalid MAC address, defaulting to random\n");
eth_hw_addr_random(dev);
memcpy(sa.sa_data, dev->dev_addr, ETH_ALEN);
if (sky2_set_mac_address(dev, &sa))
netdev_warn(dev, "Failed to set MAC address.\n");
dev_warn(&hw->pdev->dev, "Failed to set MAC address.\n");
}
return dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment