All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: improve logging in phylib
@ 2019-01-15 20:50 Heiner Kallweit
  2019-01-15 21:31 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Heiner Kallweit @ 2019-01-15 20:50 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev

Some time ago phydev_info() and friends have been added. They allow to
improve and simplify logging.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/phy.c        | 5 +----
 drivers/net/phy/phy_device.c | 4 ++--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index f95753eda..304f0b7e6 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -13,8 +13,6 @@
  *
  */
 
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/errno.h>
@@ -807,8 +805,7 @@ int phy_start_interrupts(struct phy_device *phydev)
 	if (request_threaded_irq(phydev->irq, NULL, phy_interrupt,
 				 IRQF_ONESHOT | IRQF_SHARED,
 				 phydev_name(phydev), phydev) < 0) {
-		pr_warn("%s: Can't get IRQ %d (PHY)\n",
-			phydev->mdio.bus->name, phydev->irq);
+		phydev_warn(phydev, "Can't get IRQ %d\n", phydev->irq);
 		phydev->irq = PHY_POLL;
 		return 0;
 	}
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index f7ec6cdf8..e61e9083f 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -824,13 +824,13 @@ int phy_device_register(struct phy_device *phydev)
 	/* Run all of the fixups for this PHY */
 	err = phy_scan_fixups(phydev);
 	if (err) {
-		pr_err("PHY %d failed to initialize\n", phydev->mdio.addr);
+		phydev_err(phydev, "failed to initialize\n");
 		goto out;
 	}
 
 	err = device_add(&phydev->mdio.dev);
 	if (err) {
-		pr_err("PHY %d failed to add\n", phydev->mdio.addr);
+		phydev_err(phydev, "failed to add\n");
 		goto out;
 	}
 
-- 
2.20.1

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

* Re: [PATCH net-next] net: phy: improve logging in phylib
  2019-01-15 20:50 [PATCH net-next] net: phy: improve logging in phylib Heiner Kallweit
@ 2019-01-15 21:31 ` Andrew Lunn
  2019-01-15 22:30 ` Florian Fainelli
  2019-01-17  5:04 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2019-01-15 21:31 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: Florian Fainelli, David Miller, netdev

On Tue, Jan 15, 2019 at 09:50:25PM +0100, Heiner Kallweit wrote:
> Some time ago phydev_info() and friends have been added. They allow to
> improve and simplify logging.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next] net: phy: improve logging in phylib
  2019-01-15 20:50 [PATCH net-next] net: phy: improve logging in phylib Heiner Kallweit
  2019-01-15 21:31 ` Andrew Lunn
@ 2019-01-15 22:30 ` Florian Fainelli
  2019-01-17  5:04 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2019-01-15 22:30 UTC (permalink / raw)
  To: Heiner Kallweit, Andrew Lunn, David Miller; +Cc: netdev

On 1/15/19 12:50 PM, Heiner Kallweit wrote:
> Some time ago phydev_info() and friends have been added. They allow to
> improve and simplify logging.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH net-next] net: phy: improve logging in phylib
  2019-01-15 20:50 [PATCH net-next] net: phy: improve logging in phylib Heiner Kallweit
  2019-01-15 21:31 ` Andrew Lunn
  2019-01-15 22:30 ` Florian Fainelli
@ 2019-01-17  5:04 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-01-17  5:04 UTC (permalink / raw)
  To: hkallweit1; +Cc: andrew, f.fainelli, netdev

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Tue, 15 Jan 2019 21:50:25 +0100

> Some time ago phydev_info() and friends have been added. They allow to
> improve and simplify logging.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Applied.

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

end of thread, other threads:[~2019-01-17  5:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 20:50 [PATCH net-next] net: phy: improve logging in phylib Heiner Kallweit
2019-01-15 21:31 ` Andrew Lunn
2019-01-15 22:30 ` Florian Fainelli
2019-01-17  5:04 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.