From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Serge Semin <Sergey.Semin@baikalelectronics.ru>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Johan Hovold <johan@kernel.org>
Subject: [PATCH 2/3] serial: 8250: rename unlock labels
Date: Fri, 15 Oct 2021 13:14:21 +0200 [thread overview]
Message-ID: <20211015111422.1027-3-johan@kernel.org> (raw)
In-Reply-To: <20211015111422.1027-1-johan@kernel.org>
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.
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
next prev parent reply other threads:[~2021-10-15 11:14 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 ` Johan Hovold [this message]
2021-10-15 14:24 ` [PATCH 2/3] serial: 8250: rename unlock labels Andy Shevchenko
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=20211015111422.1027-3-johan@kernel.org \
--to=johan@kernel.org \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.