mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 02:21:15 +00:00
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>
This commit is contained in:
parent
008e81656c
commit
a2ae6007a4
2 changed files with 17 additions and 21 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue