From: Greg KH <gregkh@linuxfoundation.org>
To: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: richard.genoud@gmail.com, jirislaby@kernel.org,
nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
ludovic.desroches@microchip.com, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: serial: atmel: Check return code of dmaengine_submit()
Date: Mon, 15 Nov 2021 16:58:17 +0100 [thread overview]
Message-ID: <YZKDmb/ZlYwtyX8j@kroah.com> (raw)
In-Reply-To: <20211115143004.32743-1-tudor.ambarus@microchip.com>
On Mon, Nov 15, 2021 at 04:30:04PM +0200, Tudor Ambarus wrote:
> dma_cookie_t < 0 indicates an error code, check for it.
Very odd changelog text, please be more descriptive about what is
happening here.
>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
> drivers/tty/serial/atmel_serial.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 2c99a47a2535..376f7a9c2868 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -1004,6 +1004,11 @@ static void atmel_tx_dma(struct uart_port *port)
> desc->callback = atmel_complete_tx_dma;
> desc->callback_param = atmel_port;
> atmel_port->cookie_tx = dmaengine_submit(desc);
> + if (dma_submit_error(atmel_port->cookie_tx)) {
> + dev_err(port->dev, "dma_submit_error %d\n",
> + atmel_port->cookie_tx);
> + return;
What can a user do with this error message?
Have you seen this happen in real life?
What commit does this "fix"?
thanks,
greg k-h
next prev parent reply other threads:[~2021-11-15 15:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 14:30 [PATCH] tty: serial: atmel: Check return code of dmaengine_submit() Tudor Ambarus
2021-11-15 15:58 ` Greg KH [this message]
2021-11-16 6:14 ` Tudor.Ambarus
2021-11-16 8:26 ` Greg KH
2021-11-16 11:33 ` Tudor.Ambarus
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=YZKDmb/ZlYwtyX8j@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexandre.belloni@bootlin.com \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=nicolas.ferre@microchip.com \
--cc=richard.genoud@gmail.com \
--cc=tudor.ambarus@microchip.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