From: Ladislav Michl <ladis@linux-mips.org>
To: David Lechner <david@lechnology.com>
Cc: Bin Liu <b-liu@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexandre Bailon <abailon@baylibre.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: musb: da8xx: Don't print phy error on -EPROBE_DEFER
Date: Wed, 2 Nov 2016 22:45:59 +0100 [thread overview]
Message-ID: <20161102214559.GA2338@localhost.localdomain> (raw)
In-Reply-To: <1477422170-1490-1-git-send-email-david@lechnology.com>
Hi,
On Tue, Oct 25, 2016 at 02:02:50PM -0500, David Lechner wrote:
> This suppresses printing the error message "failed to get phy" in the
> kernel log when the error is -EPROBE_DEFER. This prevents usless noise
> in the kernel log.
>
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
> drivers/usb/musb/da8xx.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
> index 481d786..f8a1591 100644
> --- a/drivers/usb/musb/da8xx.c
> +++ b/drivers/usb/musb/da8xx.c
> @@ -516,7 +516,8 @@ static int da8xx_probe(struct platform_device *pdev)
>
> glue->phy = devm_phy_get(&pdev->dev, "usb-phy");
> if (IS_ERR(glue->phy)) {
> - dev_err(&pdev->dev, "failed to get phy\n");
> + if (PTR_ERR(glue->phy) != -EPROBE_DEFER)
> + dev_err(&pdev->dev, "failed to get phy\n");
What about something like this?
dev_printk(PTR_ERR(glue->phy) == -EPROBE_DEFER ? KERN_DEBUG : KERN_ERR, ...
At least it outputs something if debug is enabled, making debugging easier.
ladis
> return PTR_ERR(glue->phy);
> }
>
next prev parent reply other threads:[~2016-11-02 21:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 19:02 [PATCH] usb: musb: da8xx: Don't print phy error on -EPROBE_DEFER David Lechner
2016-11-01 19:44 ` Bin Liu
2016-11-02 21:45 ` Ladislav Michl [this message]
2016-11-03 15:42 ` Bin Liu
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=20161102214559.GA2338@localhost.localdomain \
--to=ladis@linux-mips.org \
--cc=abailon@baylibre.com \
--cc=b-liu@ti.com \
--cc=david@lechnology.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.