diff options
author | Joe Perches <joe@perches.com> | 2014-11-10 01:32:46 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-11 19:30:57 +0100 |
commit | a2ae6007a442d6bb27d77bf20ec1b06cda9e306e (patch) | |
tree | 6bf28d8f5d0e87c274465178e7ef211f3a1c1a9f /net/dsa/slave.c | |
parent | Merge branch 'mlx4-next' (diff) | |
download | linux-a2ae6007a442d6bb27d77bf20ec1b06cda9e306e.tar.xz linux-a2ae6007a442d6bb27d77bf20ec1b06cda9e306e.zip |
dsa: Use netdev_<level> instead of printk
Neaten and standardize the logging output.
Other miscellanea:
o Use pr_notice_once instead of a guard flag.
o Convert existing pr_<level> uses too.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 0ea466dad818..528380a3e296 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -532,7 +532,7 @@ static void dsa_slave_phy_setup(struct dsa_slave_priv *p, */ ret = of_phy_register_fixed_link(port_dn); if (ret) { - pr_err("failed to register fixed PHY\n"); + netdev_err(slave_dev, "failed to register fixed PHY\n"); return; } phy_is_fixed = true; @@ -558,8 +558,8 @@ static void dsa_slave_phy_setup(struct dsa_slave_priv *p, phy_connect_direct(slave_dev, p->phy, dsa_slave_adjust_link, p->phy_interface); } else { - pr_info("attached PHY at address %d [%s]\n", - p->phy->addr, p->phy->drv->name); + netdev_info(slave_dev, "attached PHY at address %d [%s]\n", + p->phy->addr, p->phy->drv->name); } } @@ -657,8 +657,8 @@ dsa_slave_create(struct dsa_switch *ds, struct device *parent, ret = register_netdev(slave_dev); if (ret) { - printk(KERN_ERR "%s: error %d registering interface %s\n", - master->name, ret, slave_dev->name); + netdev_err(master, "error %d registering interface %s\n", + ret, slave_dev->name); free_netdev(slave_dev); return NULL; } |