public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390:tty3270:move spin_lock_bh to spin_lock in tasklet
@ 2019-03-19 16:12 Jeff Xie
  2019-03-20  7:27 ` Heiko Carstens
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Xie @ 2019-03-19 16:12 UTC (permalink / raw)
  To: chwidefsky, heiko.carstens
  Cc: rppt, akpm, mhocko, keescook, chongguiguzi, linux-s390,
	linux-kernel

It is unnecessary to call spin_lock_bh in a tasklet.

Signed-off-by: Jeff Xie <chongguiguzi@gmail.com>
---
 drivers/s390/char/tty3270.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c
index 2b0c36c2..2963396 100644
--- a/drivers/s390/char/tty3270.c
+++ b/drivers/s390/char/tty3270.c
@@ -563,7 +563,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq)
 	char *input;
 	int len;
 
-	spin_lock_bh(&tp->view.lock);
+	spin_lock(&tp->view.lock);
 	/*
 	 * Two AID keys are special: For 0x7d (enter) the input line
 	 * has to be emitted to the tty and for 0x6d the screen
@@ -590,7 +590,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq)
 		tp->update_flags = TTY_UPDATE_ALL;
 		tty3270_set_timer(tp, 1);
 	}
-	spin_unlock_bh(&tp->view.lock);
+	spin_unlock(&tp->view.lock);
 
 	/* Start keyboard reset command. */
 	raw3270_request_reset(tp->kreset);
-- 
2.7.4


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

* Re: [PATCH] s390:tty3270:move spin_lock_bh to spin_lock in tasklet
  2019-03-19 16:12 [PATCH] s390:tty3270:move spin_lock_bh to spin_lock in tasklet Jeff Xie
@ 2019-03-20  7:27 ` Heiko Carstens
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2019-03-20  7:27 UTC (permalink / raw)
  To: Jeff Xie
  Cc: schwidefsky, rppt, akpm, mhocko, keescook, linux-s390,
	linux-kernel

On Wed, Mar 20, 2019 at 12:12:36AM +0800, Jeff Xie wrote:
> It is unnecessary to call spin_lock_bh in a tasklet.
> 
> Signed-off-by: Jeff Xie <chongguiguzi@gmail.com>
> ---
>  drivers/s390/char/tty3270.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c
> index 2b0c36c2..2963396 100644
> --- a/drivers/s390/char/tty3270.c
> +++ b/drivers/s390/char/tty3270.c
> @@ -563,7 +563,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq)
>  	char *input;
>  	int len;
> 
> -	spin_lock_bh(&tp->view.lock);
> +	spin_lock(&tp->view.lock);
>  	/*
>  	 * Two AID keys are special: For 0x7d (enter) the input line
>  	 * has to be emitted to the tty and for 0x6d the screen
> @@ -590,7 +590,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq)
>  		tp->update_flags = TTY_UPDATE_ALL;
>  		tty3270_set_timer(tp, 1);
>  	}
> -	spin_unlock_bh(&tp->view.lock);
> +	spin_unlock(&tp->view.lock);

I'm not going to take this. There is close to zero benefit, but rather
high cost to review this - just because the function is named *tasklet
doesn't mean it is only called in tasklet / softirq context.


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

end of thread, other threads:[~2019-03-20  7:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-19 16:12 [PATCH] s390:tty3270:move spin_lock_bh to spin_lock in tasklet Jeff Xie
2019-03-20  7:27 ` Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox