From: Jiri Slaby <jirislaby@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH v1 1/1] serial: 8250_port: Drop duplicate NULL check
Date: Tue, 3 Mar 2026 06:25:29 +0100 [thread overview]
Message-ID: <c1500ee2-d609-4c66-b301-2b081722eef9@kernel.org> (raw)
In-Reply-To: <20260302152738.2498579-1-andriy.shevchenko@linux.intel.com>
On 02. 03. 26, 16:27, Andy Shevchenko wrote:
> serial8250_release_dma() is NULL-aware, no need to check this in the caller.
> While at it, make sure DMA won't be used again, by NULLifying the pointer.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/tty/serial/8250/8250_port.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> index d99c5ad7e47c..2a830969d22b 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -2366,8 +2366,8 @@ void serial8250_do_shutdown(struct uart_port *port)
>
> synchronize_irq(port->irq);
>
> - if (up->dma)
> - serial8250_release_dma(up);
> + serial8250_release_dma(up);
> + up->dma = NULL;
Shouldn't serial8250_release_dma() NULL it instead, so the callers need
not to bother?
thanks,
--
js
suse labs
next prev parent reply other threads:[~2026-03-03 5:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 15:27 [PATCH v1 1/1] serial: 8250_port: Drop duplicate NULL check Andy Shevchenko
2026-03-03 5:25 ` Jiri Slaby [this message]
2026-03-03 7:55 ` Andy Shevchenko
2026-03-03 8:26 ` Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2026-01-28 14:27 Andy Shevchenko
2026-01-28 15:09 ` Ilpo Järvinen
2026-01-28 15:44 ` Andy Shevchenko
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=c1500ee2-d609-4c66-b301-2b081722eef9@kernel.org \
--to=jirislaby@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox