diff mbox series

Marvell Sky2 Ethernet adapter: fix warning messages.

Message ID m3a6s1r1ul.fsf@t19.piap.pl (mailing list archive)
State Accepted
Commit 18755e270666ce869289bceb734d25eae2be9da9
Delegated to: Netdev Maintainers
Headers show
Series Marvell Sky2 Ethernet adapter: fix warning messages. | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 16 this patch: 16
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Krzysztof Hałasa Feb. 18, 2021, 12:34 p.m. UTC
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>

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 23, 2021, 8:20 p.m. UTC | #1
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
diff mbox series

Patch

--- 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;