linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: cdc-ncm:  Move spin_lock_bh() to spin_lock()
@ 2022-04-18 14:18 Yunbo Yu
  2022-04-19  7:21 ` Oliver Neukum
  2022-04-22  9:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Yunbo Yu @ 2022-04-18 14:18 UTC (permalink / raw)
  To: oliver, davem, kuba, pabeni; +Cc: linux-usb, netdev, linux-kernel, Yunbo Yu

It is unnecessary to call spin_lock_bh() for you are already in a tasklet.

Signed-off-by: Yunbo Yu <yuyunbo519@gmail.com>
---
 drivers/net/usb/cdc_ncm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 15f91d691bba..cdca00c0dc1f 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1492,19 +1492,19 @@ static void cdc_ncm_txpath_bh(struct tasklet_struct *t)
 	struct cdc_ncm_ctx *ctx = from_tasklet(ctx, t, bh);
 	struct usbnet *dev = ctx->dev;
 
-	spin_lock_bh(&ctx->mtx);
+	spin_lock(&ctx->mtx);
 	if (ctx->tx_timer_pending != 0) {
 		ctx->tx_timer_pending--;
 		cdc_ncm_tx_timeout_start(ctx);
-		spin_unlock_bh(&ctx->mtx);
+		spin_unlock(&ctx->mtx);
 	} else if (dev->net != NULL) {
 		ctx->tx_reason_timeout++;	/* count reason for transmitting */
-		spin_unlock_bh(&ctx->mtx);
+		spin_unlock(&ctx->mtx);
 		netif_tx_lock_bh(dev->net);
 		usbnet_start_xmit(NULL, dev->net);
 		netif_tx_unlock_bh(dev->net);
 	} else {
-		spin_unlock_bh(&ctx->mtx);
+		spin_unlock(&ctx->mtx);
 	}
 }
 
-- 
2.25.1


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

* Re: [PATCH] net: cdc-ncm: Move spin_lock_bh() to spin_lock()
  2022-04-18 14:18 [PATCH] net: cdc-ncm: Move spin_lock_bh() to spin_lock() Yunbo Yu
@ 2022-04-19  7:21 ` Oliver Neukum
  2022-04-22  9:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: Oliver Neukum @ 2022-04-19  7:21 UTC (permalink / raw)
  To: Yunbo Yu, oliver, davem, kuba, pabeni; +Cc: linux-usb, netdev, linux-kernel



On 18.04.22 16:18, Yunbo Yu wrote:
> It is unnecessary to call spin_lock_bh() for you are already in a tasklet.
>
> Signed-off-by: Yunbo Yu <yuyunbo519@gmail.com>
>
Acked-by: Oliver Neukum <oneukum@suse.com>


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

* Re: [PATCH] net: cdc-ncm:  Move spin_lock_bh() to spin_lock()
  2022-04-18 14:18 [PATCH] net: cdc-ncm: Move spin_lock_bh() to spin_lock() Yunbo Yu
  2022-04-19  7:21 ` Oliver Neukum
@ 2022-04-22  9:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-22  9:30 UTC (permalink / raw)
  To: Yunbo Yu; +Cc: oliver, davem, kuba, pabeni, linux-usb, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 18 Apr 2022 22:18:12 +0800 you wrote:
> It is unnecessary to call spin_lock_bh() for you are already in a tasklet.
> 
> Signed-off-by: Yunbo Yu <yuyunbo519@gmail.com>
> ---
>  drivers/net/usb/cdc_ncm.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Here is the summary with links:
  - net: cdc-ncm: Move spin_lock_bh() to spin_lock()
    https://git.kernel.org/netdev/net-next/c/f1ed409fb1ee

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* [PATCH] net: cdc-ncm:  Move spin_lock_bh() to spin_lock()
@ 2022-04-18 12:34 Yunbo Yu
  0 siblings, 0 replies; 4+ messages in thread
From: Yunbo Yu @ 2022-04-18 12:34 UTC (permalink / raw)
  To: oliver, davem, kuba, pabeni; +Cc: linux-usb, netdev, linux-kernel, Yunbo Yu

It is unnecessary to call spin_lock_bh() for you are already in a tasklet.

Signed-off-by: Yunbo Yu <yuyunbo519@gmail.com>
---
 drivers/net/usb/cdc_ncm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 15f91d691bba..cdca00c0dc1f 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1492,19 +1492,19 @@ static void cdc_ncm_txpath_bh(struct tasklet_struct *t)
 	struct cdc_ncm_ctx *ctx = from_tasklet(ctx, t, bh);
 	struct usbnet *dev = ctx->dev;
 
-	spin_lock_bh(&ctx->mtx);
+	spin_lock(&ctx->mtx);
 	if (ctx->tx_timer_pending != 0) {
 		ctx->tx_timer_pending--;
 		cdc_ncm_tx_timeout_start(ctx);
-		spin_unlock_bh(&ctx->mtx);
+		spin_unlock(&ctx->mtx);
 	} else if (dev->net != NULL) {
 		ctx->tx_reason_timeout++;	/* count reason for transmitting */
-		spin_unlock_bh(&ctx->mtx);
+		spin_unlock(&ctx->mtx);
 		netif_tx_lock_bh(dev->net);
 		usbnet_start_xmit(NULL, dev->net);
 		netif_tx_unlock_bh(dev->net);
 	} else {
-		spin_unlock_bh(&ctx->mtx);
+		spin_unlock(&ctx->mtx);
 	}
 }
 
-- 
2.25.1


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

end of thread, other threads:[~2022-04-22  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 14:18 [PATCH] net: cdc-ncm: Move spin_lock_bh() to spin_lock() Yunbo Yu
2022-04-19  7:21 ` Oliver Neukum
2022-04-22  9:30 ` patchwork-bot+netdevbpf
  -- strict thread matches above, loose matches on Subject: below --
2022-04-18 12:34 Yunbo Yu

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