From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
"David S . Miller" <davem@davemloft.net>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 2/2] sh_eth: Do not print an error message for probe deferral
Date: Thu, 18 May 2017 15:01:35 +0200 [thread overview]
Message-ID: <1495112495-25086-2-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1495112495-25086-1-git-send-email-geert+renesas@glider.be>
EPROBE_DEFER is not an error, hence printing an error message like
sh-eth ee700000.ethernet: failed to initialise MDIO
may confuse the user.
To fix this, suppress the error message in case of probe deferral.
While at it, shorten the message, and add the actual error code.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/net/ethernet/renesas/sh_eth.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index c85222b02754f5a7..2d686ccf971b1b65 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -3220,7 +3220,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
/* MDIO bus init */
ret = sh_mdio_init(mdp, pd);
if (ret) {
- dev_err(&pdev->dev, "failed to initialise MDIO\n");
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "MDIO init failed: %d\n", ret);
goto out_release;
}
--
2.7.4
next prev parent reply other threads:[~2017-05-18 13:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 13:01 [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Geert Uytterhoeven
2017-05-18 13:01 ` Geert Uytterhoeven [this message]
2017-05-18 13:08 ` [PATCH 2/2] sh_eth: Do not print an error message for probe deferral Laurent Pinchart
2017-05-18 15:21 ` David Miller
2017-05-18 16:37 ` Sergei Shtylyov
2017-05-18 13:08 ` [PATCH 1/2] sh_eth: Use platform device for printing before register_netdev() Laurent Pinchart
2017-05-18 15:21 ` David Miller
2017-05-18 16:32 ` Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495112495-25086-2-git-send-email-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=davem@davemloft.net \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).