diff mbox series

[net-next] octeontx2-af: mcs: Remove redundant 'flush_workqueue()' calls

Message ID 20250324080854.408188-1-nichen@iscas.ac.cn (mailing list archive)
State Accepted
Commit b2d1e4c2cb8a27693acd1add5ef7295a976a63dd
Delegated to: Netdev Maintainers
Headers show
Series [net-next] octeontx2-af: mcs: Remove redundant 'flush_workqueue()' calls | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-03-24--12-00 (tests: 896)

Commit Message

Chen Ni March 24, 2025, 8:08 a.m. UTC
'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

This was generated with coccinelle:

@@
expression E;
@@

- flush_workqueue(E);
  destroy_workqueue(E);

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Geetha sowjanya March 24, 2025, 8:31 a.m. UTC | #1
>-----Original Message-----
>From: Chen Ni <nichen@iscas.ac.cn>
>Sent: Monday, March 24, 2025 1:39 PM
>To: Sunil Kovvuri Goutham <sgoutham@marvell.com>; Linu Cherian
><lcherian@marvell.com>; Geethasowjanya Akula <gakula@marvell.com>; Jerin
>Jacob <jerinj@marvell.com>; Hariprasad Kelam <hkelam@marvell.com>;
>Subbaraya Sundeep Bhatta <sbhatta@marvell.com>; andrew+netdev@lunn.ch;
>davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
>pabeni@redhat.com
>Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Chen Ni
><nichen@iscas.ac.cn>
>Subject: [EXTERNAL] [PATCH net-next] octeontx2-af: mcs: Remove redundant
>'flush_workqueue()' calls
>
>'destroy_workqueue()' already drains the queue before destroying it, so there is
>no need to flush it explicitly.
>
>Remove the redundant 'flush_workqueue()' calls.
>
>This was generated with coccinelle:
>
>@@
>expression E;
>@@
>
>- flush_workqueue(E);
>  destroy_workqueue(E);
>
>Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
>---
> drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
>b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
>index d39d86e694cc..655dd4726d36 100644
>--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
>+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
>@@ -925,7 +925,6 @@ void rvu_mcs_exit(struct rvu *rvu)
> 	if (!rvu->mcs_intr_wq)
> 		return;
>
>-	flush_workqueue(rvu->mcs_intr_wq);
> 	destroy_workqueue(rvu->mcs_intr_wq);
> 	rvu->mcs_intr_wq = NULL;
> }
>--
>2.25.1
Thanks for the fix.
Reviewed-by: Geetha sowjanya <gakula@marvell.com>
Simon Horman March 25, 2025, 3:45 p.m. UTC | #2
On Mon, Mar 24, 2025 at 04:08:54PM +0800, Chen Ni wrote:
> 'destroy_workqueue()' already drains the queue before destroying it, so
> there is no need to flush it explicitly.
> 
> Remove the redundant 'flush_workqueue()' calls.
> 
> This was generated with coccinelle:
> 
> @@
> expression E;
> @@
> 
> - flush_workqueue(E);
>   destroy_workqueue(E);
> 
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Reviewed-by: Simon Horman <horms@kernel.org>
patchwork-bot+netdevbpf@kernel.org March 25, 2025, 4:40 p.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 24 Mar 2025 16:08:54 +0800 you wrote:
> 'destroy_workqueue()' already drains the queue before destroying it, so
> there is no need to flush it explicitly.
> 
> Remove the redundant 'flush_workqueue()' calls.
> 
> This was generated with coccinelle:
> 
> [...]

Here is the summary with links:
  - [net-next] octeontx2-af: mcs: Remove redundant 'flush_workqueue()' calls
    https://git.kernel.org/netdev/net-next/c/b2d1e4c2cb8a

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
index d39d86e694cc..655dd4726d36 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
@@ -925,7 +925,6 @@  void rvu_mcs_exit(struct rvu *rvu)
 	if (!rvu->mcs_intr_wq)
 		return;
 
-	flush_workqueue(rvu->mcs_intr_wq);
 	destroy_workqueue(rvu->mcs_intr_wq);
 	rvu->mcs_intr_wq = NULL;
 }