Commit c3a6a174 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: phy: improve logging in phylib

Some time ago phydev_info() and friends have been added. They allow to
improve and simplify logging.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1868e3d7
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
* *
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -814,8 +812,7 @@ int phy_start_interrupts(struct phy_device *phydev) ...@@ -814,8 +812,7 @@ int phy_start_interrupts(struct phy_device *phydev)
if (request_threaded_irq(phydev->irq, NULL, phy_interrupt, if (request_threaded_irq(phydev->irq, NULL, phy_interrupt,
IRQF_ONESHOT | IRQF_SHARED, IRQF_ONESHOT | IRQF_SHARED,
phydev_name(phydev), phydev) < 0) { phydev_name(phydev), phydev) < 0) {
pr_warn("%s: Can't get IRQ %d (PHY)\n", phydev_warn(phydev, "Can't get IRQ %d\n", phydev->irq);
phydev->mdio.bus->name, phydev->irq);
phydev->irq = PHY_POLL; phydev->irq = PHY_POLL;
return 0; return 0;
} }
......
...@@ -819,13 +819,13 @@ int phy_device_register(struct phy_device *phydev) ...@@ -819,13 +819,13 @@ int phy_device_register(struct phy_device *phydev)
/* Run all of the fixups for this PHY */ /* Run all of the fixups for this PHY */
err = phy_scan_fixups(phydev); err = phy_scan_fixups(phydev);
if (err) { if (err) {
pr_err("PHY %d failed to initialize\n", phydev->mdio.addr); phydev_err(phydev, "failed to initialize\n");
goto out; goto out;
} }
err = device_add(&phydev->mdio.dev); err = device_add(&phydev->mdio.dev);
if (err) { if (err) {
pr_err("PHY %d failed to add\n", phydev->mdio.addr); phydev_err(phydev, "failed to add\n");
goto out; goto out;
} }
......
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