aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/msm_serial.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2020-07-23 14:33:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-24 10:44:27 +0200
commitca45b5cd55d2ea2e4f2ddec1175cc9bdb5b74e07 (patch)
treef30870a135a7d0e5c3d2906a96d47317f7402000 /drivers/tty/serial/msm_serial.c
parentserial: pmac_zilog: add sparse context annotation (diff)
downloadlinux-dev-ca45b5cd55d2ea2e4f2ddec1175cc9bdb5b74e07.tar.xz
linux-dev-ca45b5cd55d2ea2e4f2ddec1175cc9bdb5b74e07.zip
serial: msm_serial: add sparse context annotation
Add sparse context annotation to the receive handlers, which release and reacquire the port lock, to silence sparse warnings: drivers/tty/serial/msm_serial.c:748:25: warning: context imbalance in 'msm_handle_rx_dm' - unexpected unlock drivers/tty/serial/msm_serial.c:814:28: warning: context imbalance in 'msm_handle_rx' - unexpected unlock Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200723123327.5843-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/msm_serial.c')
-rw-r--r--drivers/tty/serial/msm_serial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 60a9c53fa7cb..87f005e5d2af 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -696,6 +696,7 @@ static void msm_enable_ms(struct uart_port *port)
}
static void msm_handle_rx_dm(struct uart_port *port, unsigned int misr)
+ __must_hold(&port->lock)
{
struct tty_port *tport = &port->state->port;
unsigned int sr;
@@ -771,6 +772,7 @@ static void msm_handle_rx_dm(struct uart_port *port, unsigned int misr)
}
static void msm_handle_rx(struct uart_port *port)
+ __must_hold(&port->lock)
{
struct tty_port *tport = &port->state->port;
unsigned int sr;