From: Jules Irenge <jbi.octave@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: boqun.feng@gmail.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org (open list:SERIAL DRIVERS)
Subject: [PATCH 7/7] tty: serial_core: Add missing annotation for _unlock_and_check_sysrq()
Date: Tue, 31 Mar 2020 21:46:43 +0100 [thread overview]
Message-ID: <20200331204643.11262-8-jbi.octave@gmail.com> (raw)
In-Reply-To: <20200331204643.11262-1-jbi.octave@gmail.com>
Sparse reports a warning at _unlock_and_check_sysrq()
warning: context imbalance in uart_unlock_and_check_sysrq()
- unexpected unlock
The root cause is the missing annotation at _unlock_and_check_sysrq()
Add the missing __releases(&port->lock) annotation.
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/tty/serial/serial_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 76e506ee335c..32f93f03efce 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -3121,6 +3121,7 @@ int uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch)
EXPORT_SYMBOL_GPL(uart_prepare_sysrq_char);
void uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long irqflags)
+ __releases(&port->lock)
{
int sysrq_ch;
--
2.24.1
next parent reply other threads:[~2020-03-31 20:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0/7>
[not found] ` <20200331204643.11262-1-jbi.octave@gmail.com>
2020-03-31 20:46 ` Jules Irenge [this message]
2020-04-16 13:58 ` [PATCH 7/7] tty: serial_core: Add missing annotation for _unlock_and_check_sysrq() Greg Kroah-Hartman
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=20200331204643.11262-8-jbi.octave@gmail.com \
--to=jbi.octave@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).