From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Johan Hovold <johan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Serge Semin <Sergey.Semin@baikalelectronics.ru>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] serial: 8250: rename unlock labels
Date: Fri, 15 Oct 2021 17:24:14 +0300 [thread overview]
Message-ID: <YWmPDhj+x2E6XkYC@smile.fi.intel.com> (raw)
In-Reply-To: <20211015111422.1027-3-johan@kernel.org>
On Fri, Oct 15, 2021 at 01:14:21PM +0200, Johan Hovold wrote:
> Rename a couple of oddly named labels that are used to unlock before
> returning after what they do (rather than after the context they are
> used in) to improve readability.
I'm on the same page with the label naming schema, hence
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/tty/serial/8250/8250_port.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> index e4dd82fd7c2a..5775cbff8f6e 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -1338,7 +1338,7 @@ static void autoconfig(struct uart_8250_port *up)
> up->tx_loadsz = uart_config[port->type].tx_loadsz;
>
> if (port->type == PORT_UNKNOWN)
> - goto out_lock;
> + goto out_unlock;
>
> /*
> * Reset the UART.
> @@ -1355,7 +1355,7 @@ static void autoconfig(struct uart_8250_port *up)
> else
> serial_out(up, UART_IER, 0);
>
> -out_lock:
> +out_unlock:
> spin_unlock_irqrestore(&port->lock, flags);
>
> /*
> @@ -2714,12 +2714,12 @@ void serial8250_update_uartclk(struct uart_port *port, unsigned int uartclk)
> mutex_lock(&tport->mutex);
>
> if (port->uartclk == uartclk)
> - goto out_lock;
> + goto out_unlock;
>
> port->uartclk = uartclk;
>
> if (!tty_port_initialized(tport))
> - goto out_lock;
> + goto out_unlock;
>
> termios = &tty->termios;
>
> @@ -2737,7 +2737,7 @@ void serial8250_update_uartclk(struct uart_port *port, unsigned int uartclk)
> spin_unlock_irqrestore(&port->lock, flags);
> serial8250_rpm_put(up);
>
> -out_lock:
> +out_unlock:
> mutex_unlock(&tport->mutex);
> up_write(&tty->termios_rwsem);
> tty_kref_put(tty);
> --
> 2.32.0
>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-10-15 11:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 11:14 [PATCH 0/3] serial: 8250: fix racy uartclk update Johan Hovold
2021-10-15 11:14 ` [PATCH 1/3] " Johan Hovold
2021-10-15 14:23 ` Andy Shevchenko
2021-10-15 11:14 ` [PATCH 2/3] serial: 8250: rename unlock labels Johan Hovold
2021-10-15 14:24 ` Andy Shevchenko [this message]
2021-10-16 15:40 ` Serge Semin
2021-10-15 11:14 ` [PATCH 3/3] serial: 8250_dw: drop bogus uartclk optimisation Johan Hovold
2021-10-15 14:25 ` Andy Shevchenko
2021-10-15 19:10 ` [PATCH 0/3] serial: 8250: fix racy uartclk update Serge Semin
2021-10-16 15:25 ` Serge Semin
2021-10-18 6:29 ` 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=YWmPDhj+x2E6XkYC@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.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