linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: don't log probe deferrals; but do log other error codes
@ 2018-11-07 20:40 Brian Norris
  2018-11-10 10:00 ` Enric Balletbo Serra
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Norris @ 2018-11-07 20:40 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-usb, linux-kernel, Brian Norris

It's not very useful to repeat a bunch of probe deferral errors. And
it's also not very useful to log "failed" without telling the error
code.

Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 drivers/usb/dwc3/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 88c80fcc39f5..1ef346ba6a02 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1482,7 +1482,8 @@ static int dwc3_probe(struct platform_device *pdev)
 
 	ret = dwc3_core_init(dwc);
 	if (ret) {
-		dev_err(dev, "failed to initialize core\n");
+		if (ret != -EPROBE_DEFER)
+			dev_err(dev, "failed to initialize core: %d\n", ret);
 		goto err4;
 	}
 
-- 
2.19.1.930.g4563a0d9d0-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: dwc3: don't log probe deferrals; but do log other error codes
  2018-11-07 20:40 [PATCH] usb: dwc3: don't log probe deferrals; but do log other error codes Brian Norris
@ 2018-11-10 10:00 ` Enric Balletbo Serra
  0 siblings, 0 replies; 2+ messages in thread
From: Enric Balletbo Serra @ 2018-11-10 10:00 UTC (permalink / raw)
  To: Brian Norris; +Cc: Felipe Balbi, linux-usb, linux-kernel

Hi,
Missatge de Brian Norris <briannorris@chromium.org> del dia dc., 7 de
nov. 2018 a les 21:42:
>
> It's not very useful to repeat a bunch of probe deferral errors. And
> it's also not very useful to log "failed" without telling the error
> code.
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
>  drivers/usb/dwc3/core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 88c80fcc39f5..1ef346ba6a02 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1482,7 +1482,8 @@ static int dwc3_probe(struct platform_device *pdev)
>
>         ret = dwc3_core_init(dwc);
>         if (ret) {
> -               dev_err(dev, "failed to initialize core\n");
> +               if (ret != -EPROBE_DEFER)
> +                       dev_err(dev, "failed to initialize core: %d\n", ret);
>                 goto err4;
>         }
>
> --
> 2.19.1.930.g4563a0d9d0-goog
>

fwiw this removes an annoying boot message that appears on every boot
and also was confusing some people that thought that their usb didn't
work.

Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-10 10:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 20:40 [PATCH] usb: dwc3: don't log probe deferrals; but do log other error codes Brian Norris
2018-11-10 10:00 ` Enric Balletbo Serra

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).