[PATCH net-next] net: dsa: Improve subordinate PHY error message

From: Florian Fainelli
Date: Tue Jun 30 2020 - 00:43:24 EST


It is not very informative to know the DSA master device when a
subordinate network device fails to get its PHY setup. Provide the
device name and capitalize PHY while we are it.

Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
---
net/dsa/slave.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 4c7f086a047b..e147e10b411c 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1795,7 +1795,8 @@ int dsa_slave_create(struct dsa_port *port)

ret = dsa_slave_phy_setup(slave_dev);
if (ret) {
- netdev_err(master, "error %d setting up slave phy\n", ret);
+ netdev_err(master, "error %d setting up slave PHY for %s\n",
+ ret, slave_dev->name);
goto out_gcells;
}

--
2.17.1