Netdev Archive on lore.kernel.org
 help / color / 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, back to index

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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git