Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: mdiobus: Debug print fwnode handle instead of raw pointer

Was slightly misleading before, because printed is pointer to fwnode,
not to phy device, as placement in message suggested. Include header
for dev_dbg() declaration while at it.

Output before:

[ +0.001247] mdio_bus f802c000.ethernet-ffffffff: registered phy 2612f00a fwnode at address 3

Output after:

[ +0.001229] mdio_bus f802c000.ethernet-ffffffff: registered phy fwnode /ahb/apb/ethernet@f802c000/ethernet-phy@3 at address 3

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Link: https://patch.msgid.link/20240906062256.11289-1-ada@thorsis.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Alexander Dahl and committed by
Paolo Abeni
525034e2 f8406a2f

+2 -1
+2 -1
drivers/net/mdio/fwnode_mdio.c
··· 7 7 */ 8 8 9 9 #include <linux/acpi.h> 10 + #include <linux/dev_printk.h> 10 11 #include <linux/fwnode_mdio.h> 11 12 #include <linux/of.h> 12 13 #include <linux/phy.h> ··· 105 104 return rc; 106 105 } 107 106 108 - dev_dbg(&mdio->dev, "registered phy %p fwnode at address %i\n", 107 + dev_dbg(&mdio->dev, "registered phy fwnode %pfw at address %i\n", 109 108 child, addr); 110 109 return 0; 111 110 }