* [PATCH net] net: socionext: ave: Avoid using netdev_err() before calling register_netdev()
@ 2019-09-26 6:35 Kunihiko Hayashi
2019-09-27 18:28 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Kunihiko Hayashi @ 2019-09-26 6:35 UTC (permalink / raw)
To: David S. Miller, netdev; +Cc: linux-kernel, Kunihiko Hayashi
Until calling register_netdev(), ndev->dev_name isn't specified, and
netdev_err() displays "(unnamed net_device)".
ave 65000000.ethernet (unnamed net_device) (uninitialized): invalid phy-mode setting
ave: probe of 65000000.ethernet failed with error -22
This replaces netdev_err() with dev_err() before calling register_netdev().
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
drivers/net/ethernet/socionext/sni_ave.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c
index 10d0c3e..f20f6c4 100644
--- a/drivers/net/ethernet/socionext/sni_ave.c
+++ b/drivers/net/ethernet/socionext/sni_ave.c
@@ -1662,19 +1662,19 @@ static int ave_probe(struct platform_device *pdev)
"socionext,syscon-phy-mode",
1, 0, &args);
if (ret) {
- netdev_err(ndev, "can't get syscon-phy-mode property\n");
+ dev_err(dev, "can't get syscon-phy-mode property\n");
goto out_free_netdev;
}
priv->regmap = syscon_node_to_regmap(args.np);
of_node_put(args.np);
if (IS_ERR(priv->regmap)) {
- netdev_err(ndev, "can't map syscon-phy-mode\n");
+ dev_err(dev, "can't map syscon-phy-mode\n");
ret = PTR_ERR(priv->regmap);
goto out_free_netdev;
}
ret = priv->data->get_pinmode(priv, phy_mode, args.args[0]);
if (ret) {
- netdev_err(ndev, "invalid phy-mode setting\n");
+ dev_err(dev, "invalid phy-mode setting\n");
goto out_free_netdev;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: socionext: ave: Avoid using netdev_err() before calling register_netdev()
2019-09-26 6:35 [PATCH net] net: socionext: ave: Avoid using netdev_err() before calling register_netdev() Kunihiko Hayashi
@ 2019-09-27 18:28 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-09-27 18:28 UTC (permalink / raw)
To: hayashi.kunihiko; +Cc: netdev, linux-kernel
From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Date: Thu, 26 Sep 2019 15:35:10 +0900
> Until calling register_netdev(), ndev->dev_name isn't specified, and
> netdev_err() displays "(unnamed net_device)".
>
> ave 65000000.ethernet (unnamed net_device) (uninitialized): invalid phy-mode setting
> ave: probe of 65000000.ethernet failed with error -22
>
> This replaces netdev_err() with dev_err() before calling register_netdev().
>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-27 18:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26 6:35 [PATCH net] net: socionext: ave: Avoid using netdev_err() before calling register_netdev() Kunihiko Hayashi
2019-09-27 18:28 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).