From: Jiri Slaby <jirislaby@kernel.org>
To: Tian Tao <tiantao6@hisilicon.com>,
gregkh@linuxfoundation.org, afaerber@suse.de,
manivannan.sadhasivam@linaro.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: serial: replace spin_lock_irqsave by spin_lock in hard IRQ
Date: Thu, 19 Nov 2020 10:03:30 +0100 [thread overview]
Message-ID: <5d722862-f0a8-629e-b01e-5269350762e5@kernel.org> (raw)
In-Reply-To: <1605776489-16283-1-git-send-email-tiantao6@hisilicon.com>
On 19. 11. 20, 10:01, Tian Tao wrote:
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
> ---
> drivers/tty/serial/owl-uart.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl-uart.c
> index c149f8c3..472fdaf 100644
> --- a/drivers/tty/serial/owl-uart.c
> +++ b/drivers/tty/serial/owl-uart.c
> @@ -251,10 +251,9 @@ static void owl_uart_receive_chars(struct uart_port *port)
> static irqreturn_t owl_uart_irq(int irq, void *dev_id)
> {
> struct uart_port *port = dev_id;
> - unsigned long flags;
> u32 stat;
>
> - spin_lock_irqsave(&port->lock, flags);
> + spin_lock(&port->lock);
>
> stat = owl_uart_read(port, OWL_UART_STAT);
>
> @@ -268,7 +267,7 @@ static irqreturn_t owl_uart_irq(int irq, void *dev_id)
> stat |= OWL_UART_STAT_RIP | OWL_UART_STAT_TIP;
> owl_uart_write(port, stat, OWL_UART_STAT);
>
> - spin_unlock_irqrestore(&port->lock, flags);
> + spin_unlock(&port->lock);
>
> return IRQ_HANDLED;
> }
>
--
js
suse labs
next prev parent reply other threads:[~2020-11-19 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 9:01 [PATCH] tty: serial: replace spin_lock_irqsave by spin_lock in hard IRQ Tian Tao
2020-11-19 9:03 ` Jiri Slaby [this message]
2020-11-20 8:23 ` Johan Hovold
2020-11-20 11:25 ` tiantao (H)
2020-11-20 12:49 ` Johan Hovold
2020-11-20 20:00 ` David Laight
2020-11-21 15:17 ` Johan Hovold
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=5d722862-f0a8-629e-b01e-5269350762e5@kernel.org \
--to=jirislaby@kernel.org \
--cc=afaerber@suse.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=tiantao6@hisilicon.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;
as well as URLs for NNTP newsgroup(s).