diff mbox series

[6.1.y-cip,06/12] serial: sh-sci: describe locking requirements for invalidating RXDMA

Message ID 20250319094754.2404386-7-tommaso.merciai.xr@bp.renesas.com (mailing list archive)
State New
Headers show
Series serial: sh-sci: Add support for RZ/G3E serial driver | expand

Commit Message

Tommaso Merciai March 19, 2025, 9:47 a.m. UTC
From: Wolfram Sang <wsa+renesas@sang-engineering.com>

commit 8efc440549087de41abadf62f4bde1d827135338 upstream.

Make sure everyone knows that calling this function needs protection.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240506114016.30498-8-wsa+renesas@sang-engineering.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/tty/serial/sh-sci.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Pavel Machek March 19, 2025, 10:20 a.m. UTC | #1
Hi!

> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> commit 8efc440549087de41abadf62f4bde1d827135338 upstream.
> 
> Make sure everyone knows that calling this function needs protection.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Link: https://lore.kernel.org/r/20240506114016.30498-8-wsa+renesas@sang-engineering.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/tty/serial/sh-sci.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
> index 69f8ac561513..7c93c9a1079b 100644
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -1264,6 +1264,7 @@ static int sci_dma_rx_find_active(struct sci_port *s)
>  	return -1;
>  }
>  
> +/* Must only be called with uart_port_lock taken */
>  static void sci_dma_rx_chan_invalidate(struct sci_port *s)
>  {
>  	unsigned int i;

Instead of comment, would lockdep_assert(...) be better / more robust
way to accomplish this?

Best regards,
								Pavel
diff mbox series

Patch

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 69f8ac561513..7c93c9a1079b 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1264,6 +1264,7 @@  static int sci_dma_rx_find_active(struct sci_port *s)
 	return -1;
 }
 
+/* Must only be called with uart_port_lock taken */
 static void sci_dma_rx_chan_invalidate(struct sci_port *s)
 {
 	unsigned int i;