linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 7/7] tty: serial_core: Add missing annotation for _unlock_and_check_sysrq()
       [not found] ` <20200331204643.11262-1-jbi.octave@gmail.com>
@ 2020-03-31 20:46   ` Jules Irenge
  2020-04-16 13:58     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Jules Irenge @ 2020-03-31 20:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: boqun.feng, Greg Kroah-Hartman, Jiri Slaby,
	open list:SERIAL DRIVERS

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 7/7] tty: serial_core: Add missing annotation for _unlock_and_check_sysrq()
  2020-03-31 20:46   ` [PATCH 7/7] tty: serial_core: Add missing annotation for _unlock_and_check_sysrq() Jules Irenge
@ 2020-04-16 13:58     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2020-04-16 13:58 UTC (permalink / raw)
  To: Jules Irenge
  Cc: linux-kernel, boqun.feng, Jiri Slaby, open list:SERIAL DRIVERS

On Tue, Mar 31, 2020 at 09:46:43PM +0100, Jules Irenge wrote:
> 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
> 

This is already in the tree, are you sure you are not working from an
older one?

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-16 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <0/7>
     [not found] ` <20200331204643.11262-1-jbi.octave@gmail.com>
2020-03-31 20:46   ` [PATCH 7/7] tty: serial_core: Add missing annotation for _unlock_and_check_sysrq() Jules Irenge
2020-04-16 13:58     ` Greg Kroah-Hartman

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).