[PATCH] ethernet:netronome:nfp:move spin_lock_bh to spin_lock in tasklet

Subsystems: netronome ethernet drivers, networking drivers, the rest

STALE2960d

4 messages, 3 authors, 2018-09-07 · open the first message on its own page

[PATCH] ethernet:netronome:nfp:move spin_lock_bh to spin_lock in tasklet

From: jun qian <hidden>
Date: 2018-09-07 16:21:41

As you are already in a tasklet, it is unnecessary to call spin_lock_bh.

Signed-off-by: jun qian <redacted>
---
 drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index a8b9fbab5f73..084c983ec3c2 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -2075,10 +2075,10 @@ static void nfp_ctrl_poll(unsigned long arg)
 {
 	struct nfp_net_r_vector *r_vec = (void *)arg;
 
-	spin_lock_bh(&r_vec->lock);
+	spin_lock(&r_vec->lock);
 	nfp_net_tx_complete(r_vec->tx_ring, 0);
 	__nfp_ctrl_tx_queued(r_vec);
-	spin_unlock_bh(&r_vec->lock);
+	spin_unlock(&r_vec->lock);
 
 	nfp_ctrl_rx(r_vec);
 
-- 
2.17.1

Re: [PATCH] ethernet:netronome:nfp:move spin_lock_bh to spin_lock in tasklet

From: Jakub Kicinski <hidden>
Date: 2018-09-07 16:33:42

On Fri,  7 Sep 2018 09:21:17 -0700, jun qian wrote:
As you are already in a tasklet, it is unnecessary to call spin_lock_bh.

Signed-off-by: jun qian <redacted>
We had more of those at some point, I wonder if you(r tool) can find
them :)

Acked-by: Jakub Kicinski <redacted>

Re: [PATCH] ethernet:netronome:nfp:move spin_lock_bh to spin_lock in tasklet

From: Jakub Kicinski <hidden>
Date: 2018-09-07 16:36:48

On Fri,  7 Sep 2018 09:21:17 -0700, jun qian wrote:
As you are already in a tasklet, it is unnecessary to call spin_lock_bh.

Signed-off-by: jun qian <redacted>
FWIW you should put spaces after the colons.  It's generally a good
practice to look at the prefix previous authors used for a given piece
of code with 

git log -- $file_path

This would be a better subject:

nfp: replace spin_lock_bh with spin_lock in tasklet callback

Re: [PATCH] ethernet:netronome:nfp:move spin_lock_bh to spin_lock in tasklet

From: David Miller <davem@davemloft.net>
Date: 2018-09-07 17:35:18

From: Jakub Kicinski <redacted>
Date: Fri, 7 Sep 2018 18:36:36 +0200
On Fri,  7 Sep 2018 09:21:17 -0700, jun qian wrote:
quoted
As you are already in a tasklet, it is unnecessary to call spin_lock_bh.

Signed-off-by: jun qian <redacted>
FWIW you should put spaces after the colons.  It's generally a good
practice to look at the prefix previous authors used for a given piece
of code with 

git log -- $file_path

This would be a better subject:

nfp: replace spin_lock_bh with spin_lock in tasklet callback
Yes, please fix your subject styling.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help