Skip to content

Commit ca45b5c

Browse files
jhovoldgregkh
authored andcommitted
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 <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent de5b2c9 commit ca45b5c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/tty/serial/msm_serial.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ static void msm_enable_ms(struct uart_port *port)
696696
}
697697

698698
static void msm_handle_rx_dm(struct uart_port *port, unsigned int misr)
699+
__must_hold(&port->lock)
699700
{
700701
struct tty_port *tport = &port->state->port;
701702
unsigned int sr;
@@ -771,6 +772,7 @@ static void msm_handle_rx_dm(struct uart_port *port, unsigned int misr)
771772
}
772773

773774
static void msm_handle_rx(struct uart_port *port)
775+
__must_hold(&port->lock)
774776
{
775777
struct tty_port *tport = &port->state->port;
776778
unsigned int sr;

0 commit comments

Comments
 (0)