From: Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Alexandre Bailon <abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: b-liu-l0cyMroinI0@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
nsekhar-l0cyMroinI0@public.gmane.org,
ptitiano-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH v3] usb: musb: musb_cppi41: Update an error message
Date: Fri, 19 May 2017 15:58:18 +0200 [thread overview]
Message-ID: <20170519135818.GD3657@localhost> (raw)
In-Reply-To: <20170519132747.4730-1-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
On Fri, May 19, 2017 at 03:27:47PM +0200, Alexandre Bailon wrote:
> If dma_request_slave_channel() failed to return a channel,
> then the driver will print an error and request to defer probe,
> regardless of the cause of the failure.
> Defer if the DMA is not ready yet otherwise print an error.
The patch summary (Subject) doesn't really reflect what you're doing
here (only deferring probe when actually requested).
But the patch itself otherwise looks good now.
> Signed-off-by: Alexandre Bailon <abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
With a more descriptive summary you can add my:
Reviewed-by: Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
> drivers/usb/musb/musb_cppi41.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
> index e7c8b1b..2c6ad93 100644
> --- a/drivers/usb/musb/musb_cppi41.c
> +++ b/drivers/usb/musb/musb_cppi41.c
> @@ -673,12 +673,14 @@ static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller)
> musb_dma->status = MUSB_DMA_STATUS_FREE;
> musb_dma->max_len = SZ_4M;
>
> - dc = dma_request_slave_channel(dev->parent, str);
> - if (!dc) {
> - dev_err(dev, "Failed to request %s.\n", str);
> - ret = -EPROBE_DEFER;
> + dc = dma_request_chan(dev->parent, str);
> + if (IS_ERR(dc)) {
> + ret = PTR_ERR(dc);
> + if (ret != -EPROBE_DEFER)
> + dev_err(dev, "Failed to request %s.\n", str);
Perhaps also include the errno here now?
> goto err;
> }
> +
> cppi41_channel->dc = dc;
> }
> return 0;
Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-05-19 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 13:27 [PATCH v3] usb: musb: musb_cppi41: Update an error message Alexandre Bailon
[not found] ` <20170519132747.4730-1-abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-05-19 13:58 ` Johan Hovold [this message]
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=20170519135818.GD3657@localhost \
--to=johan-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=abailon-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=b-liu-l0cyMroinI0@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nsekhar-l0cyMroinI0@public.gmane.org \
--cc=ptitiano-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.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 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).