serial: msm: add lock annotation to msm_set_baud_rate()
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 9 Jan 2023 15:22:12 +0000 (16:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2023 14:53:09 +0000 (15:53 +0100)
msm_set_baud_rate() releases and re-acquires the port->lock, thus add
lock annotation for Sparse static code checks.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230109152212.343476-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/msm_serial.c

index 843798e630844cfaa931a833244153fcab1b51cc..90953e679e386a84f4702680ed401cf4cae80e9c 100644 (file)
@@ -1120,6 +1120,7 @@ msm_find_best_baud(struct uart_port *port, unsigned int baud,
 
 static int msm_set_baud_rate(struct uart_port *port, unsigned int baud,
                             unsigned long *saved_flags)
+       __must_hold(&port->lock)
 {
        unsigned int rxstale, watermark, mask;
        struct msm_port *msm_port = to_msm_port(port);