lkml.org 
[lkml]   [2020]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] serial: pmac_zilog: add sparse context annotation
Date
Add sparse context annotation to the receive handler, which releases and
reacquires the port lock, to silence a sparse warning:

drivers/tty/serial/pmac_zilog.c:255:36: sparse: sparse: context imbalance in 'pmz_receive_chars' - unexpected unlock

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/tty/serial/pmac_zilog.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index ba65a3bbd72a..b0d8f4a6f9b4 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -213,6 +213,7 @@ static void pmz_interrupt_control(struct uart_pmac_port *uap, int enable)
}

static bool pmz_receive_chars(struct uart_pmac_port *uap)
+ __must_hold(uap->port.lock)
{
struct tty_port *port;
unsigned char ch, r1, drop, flag;
--
2.26.2
\
 
 \ /
  Last update: 2020-07-23 14:15    [W:0.027 / U:2.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site