netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Marvell Sky2 Ethernet adapter: fix warning messages.
@ 2021-02-18 12:34 Krzysztof Halasa
  2021-02-23 20:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Halasa @ 2021-02-18 12:34 UTC (permalink / raw)
  To: Mirko Lindner, Stephen Hemminger, David S. Miller,
	Jakub Kicinski, netdev, linux-kernel

sky2.c driver uses netdev_warn() before the net device is initialized.
Fix it by using dev_warn() instead.

Signed-off-by: Krzysztof Halasa <khalasa@piap.pl>

--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -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;

-- 
Krzysztof Halasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Marvell Sky2 Ethernet adapter: fix warning messages.
  2021-02-18 12:34 [PATCH] Marvell Sky2 Ethernet adapter: fix warning messages Krzysztof Halasa
@ 2021-02-23 20:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-23 20:20 UTC (permalink / raw)
  To: Krzysztof Halasa; +Cc: mlindner, stephen, davem, kuba, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Thu, 18 Feb 2021 13:34:42 +0100 you wrote:
> sky2.c driver uses netdev_warn() before the net device is initialized.
> Fix it by using dev_warn() instead.
> 
> Signed-off-by: Krzysztof Halasa <khalasa@piap.pl>

Here is the summary with links:
  - Marvell Sky2 Ethernet adapter: fix warning messages.
    https://git.kernel.org/netdev/net/c/18755e270666

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-23 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 12:34 [PATCH] Marvell Sky2 Ethernet adapter: fix warning messages Krzysztof Halasa
2021-02-23 20:20 ` patchwork-bot+netdevbpf

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).